Friday, 15 February 2013

regex - C# Regular Expression Reversing Match -


I'm looking to change a part of a string that is substringof ('is', verb) contains (verb, 'is')

As you can see, what is changing is in substring Strong> is included and two parameters passed in the function.

I'm looking for a common solution, using regex Using the preferred tag i.e. once I get two matches, I should be able to reverse the matches using $ 2 $ 1 (this is what I remember doing in Perl)

You can use this regular expression code:

  var re = new Regex (@ " Substringof \ ('([^'] +) ', ([^]] +) "); String Output = Re. Replay (input, @ "in ($ 2, '$ 1')");  


No comments:

Post a Comment