Using Visual Studio 2010 I would like to perform regular expression at the project level, as shown below.
Find: #region {any string here}
#region {any string here}
Replace: #region - string from above -
#region - string from above -
I tried the following:
region\s'{[^]+}' region '{[^]+}' region {:q}
But the IDE complains about the wrong template. How can i fix this?
Ahhh, Visual Studio regular expressions ... They cannot be called regular expressions, because they diverge from much of what is "standard"
I started VS, and after some trial and error this worked:
Search:
\#region \{{.*}\}
replace:
#region - \1 -
Try:
Search: {\#region:b+}{.*}
{\#region:b+}{.*}
Replace: \1 - \2 -
\1 - \2 -
If you are specifically looking for "{" and "}",
Search: {\#region:b+}\{{.*}\}
{\#region:b+}\{{.*}\}
With quotes:
Search: {\#region:b+}{'.*'}
{\#region:b+}{'.*'}
To remove quotes:
Search: {\#region:b+}'{.*}'
{\#region:b+}'{.*}'
Source: https://habr.com/ru/post/913923/More articles:How are generic methods generated in C #? - genericsWhy is my ProgressDialog listening to ANY KEY (touch) instead of reclining to reject it? - androidAny reason NGEN should hang and never end for a particular build? - .net-3.5How to center vertical child elements inside a div - htmlDatabase Selection and Licensing for Delphi Application - databaseDisable scrolling when clicking on a link - jqueryGoogle Analytics and Samsung Smart TV Applications - javascriptGoogle Analytics for Samsung Smart TV App - javascriptView the history of mercury with the blurry development of a straight line - mercurialWhy is CanExecute called after removing the command source from the user interface? - c #All Articles