VS Code Regular Expression Search only UPPERCASE letters
In VS Code I want to make the following search and replace, but it is not matching only uppercase letters. Is this a bug/deficiency or am I missing something?
Find: \{\$([A-Z_]+)\}
Replace: {$1}
so this:
$(document).ready(function ()
{
generarEstado('{$GRAPH_BY_STATUS} ','{$nombreSitio}','{$nombreSitioCorto}');
generarSexo('{$GRAPH_BY_SEX} ','{$nombreSitio}','{$nombreSitioCorto}');
generarSexGrade('{$GRAPH_BY_SEX_AND_GRADE} ','{$nombreSitio}','{$nombreSitioCorto}');
});
Should become:
$(document).ready(function ()
{
generarEstado('{GRAPH_BY_STATUS} ','{$nombreSitio}','{$nombreSitioCorto}');
generarSexo('{GRAPH_BY_SEX} ','{$nombreSitio}','{$nombreSitioCorto}');
generarSexGrade('{GRAPH_BY_SEX_AND_GRADE} ','{$nombreSitio}','{$nombreSitioCorto}');
});
but it is also matching the others {$nombreSitio}
and {$nombreSitioCorto}
etc
Make sure in your find and replace options that in addition to doing a reg ex match, that you also have the "Match Case" option checked. Personally, I think that behavior is weird. If you pick regex, it should use a regex, not a case insensitive regex, but that's the way it works apparently. See: https://github.com/Microsoft/vscode/issues/6993