Bingo:
in Visual Studio 2010 to replace <span data-bind="text: PatientGender()"></span>
to <span data-bind="text: [PatientGender]"></span>
in search field enter {[a-zA-Z0-9]+}{\(\)}
and in replace [\1]
Question
I am looking to replace ([a-zA-Z0-9])/(/) to [$1]
e.g InductionFinal() to [InductionFinal]
in VS 2010 search and replace regex.
regexes {[a-zA-Z0-9]+}{\(\)}
and ([a-zA-Z0-9]+)(/(/))
to [\0]
results in
<span data-bind="text: [PatientGender()]"></span>
How do I get rid of ()?
Solution
Bingo:
in Visual Studio 2010 to replace <span data-bind="text: PatientGender()"></span>
to <span data-bind="text: [PatientGender]"></span>
in search field enter {[a-zA-Z0-9]+}{\(\)}
and in replace [\1]
OTHER TIPS
Use +
([a-zA-Z0-9]+)\(\)
and replace it with :
[$1]
+
operator matches one or more of the previous token.