Does there any option that preg_match_all ignore \n \r ?

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Does there any option that preg_match_all ignore \n \r ?

Post by nadavvin »

Does there any option that preg_match_all ignore line breaking?

I want to get part of html and \r \n not cover by .*? to skip line breaking.

Nadav
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Yes, there is. And you can find the description on the page about pcre pattern modifers at http://de3.php.net/manual/en/reference. ... ifiers.php
search for PCRE_DOTALL
nadavvin
Forum Commoner
Posts: 68
Joined: Wed Sep 06, 2006 6:05 am

Post by nadavvin »

thanks
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post by bokehman »

Or use the s modifier.
Post Reply