View Single Post
Old 01-27-2012, 09:25 PM   #13
Serpentine
Evangelist
Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.Serpentine ought to be getting tired of karma fortunes by now.
 
Posts: 416
Karma: 1045911
Join Date: Sep 2011
Location: Cape Town, South Africa
Device: Kindle 3
(?s) is 'single line', it evaluates everything as a single line - as such .'s are not restricted to a single line, they will wrap. However if you are explicitly looking for \s's, those will also wrap around if you were not using single line, as they match the line break [\n\r].

In multiline (?m), you can use multiple [^$] to match the stard/end of lines, rather than the whole string.

As always, check out http://www.pcre.org/pcre.txt
It's surprisingly easy to read, just search around for a good starting point.
Serpentine is offline   Reply With Quote