I have something like the following in a string:
blah blah
BEGINIGNORE
this stuff should get stripped out
ENDIGNORE
more stuff here
I would like to do this (perl syntax): s/BEGINIGNORE.*ENDIGNORE//s -- namely, strip out everything between BEGINIGNORE and ENDIGNORE, inclusive. You would think the following would do that in Mathematica:
StringReplace[str, re["BEGINIGNORE[.\\s]*ENDIGNORE"]->""]
But it doesn't. How do I do this in Mathematica?
PS: I define the following alias: re = RegularExpression;