Regular expression replace in Visual Studio
pattern-matching, regex, replace, visual-studio-2010
Solution
Ahhh, Visual Studio regexes... They shouldn't be called a regex since they diverge to much of what is "standard"
I fired up VS and after some trial and error this works:
search:
\#region \{{.*}\}
replace:
#region - \1 -
Problem
Using Visual Studio 2010 I would like to do a project level regular expression replace as below. Find: `#region {any string here}` Replace: `#region - string from above -` I tried the below: ``` region\s'{[^]+}' region '{[^]+}' region {:q} ``` But the IDE complains about an incorrect pattern. How can I fix this?