in reply to Re^4: Regex Problem - alternative searched
in thread Regex Problem - alternative searched

That works for Java? Cos it doesn't here. Though I have no idea what (?s) does, or what the equivalent perl would be, so I omitted it.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^6: Regex Problem - alternative searched
by Skeeve (Parson) on May 18, 2007 at 15:16 UTC

    I'm astonished you don't know (?s). It's the same as .../s just inside the regex. It makes the . match lineends too in telling the regex to treat the text as a (?s)-ingle line instead of (?m)-ultiple lines.

    search for "imsx-imsx" in perldoc perlre


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e