Well, this pattern works for the test case that you presented:
IF\(.*\)
[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
I don't think you can do this with a straight Regex. I take that back, I don't think you can do it with a straight regex in VBSCript. I'm pretty sure that you could in a laguage that supports a richer regex syntax like Perl. What you are really looking for is a recursive parsing routine. I think you are probably going to need to roll your own unless you get lucky on google.
[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
Again I'm not sure that you can do this through a single regex since you are really doing a few replacements. You essentially need to do these replacements:
IF becomes XX
( becomes ("
, becomes ","
) becomes ")
[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.