Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Spaces and newlines in regular expressions
August 20, 2004, 3:55 pm
rate this thread
Re: Spaces and newlines in regular expressions
There's a character class "\s" that matches any whitespace character.
You can also use the regex form "/regex/s" to turn on PCRE_DOTALL, so
that the dot will match the "\n" newline characters as well. Note that
newlines are platform dependant and can be "\n" or "\r\n," etc...
Elliott C. Bäck