Re: Regex to catch <p>s (weird result)
| From: | Shawn McKenzie | Date: | Wed, 07 May 2008 18:30:08 +0000 |
| Subject: | Re: Regex to catch <p>s (weird result) | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-274001@lists.php.net to get a copy of this message | ||
Ryan S wrote:
<clip> preg_match_all('|<p[^>]*>(.*)</p>|Ui', $myText, $myArray); </clip> Hey! Thanks for replying. Your preg_match_all works like a charm, but for some reason catches only 8 out of 9 paragraphs... its really weird. I have upped the test page to http://www.ezee.se/tests/para_regex2.php.txt so you can have a look at it... didnt want to post such a lot of text to the list. Thanks again, RYep, sorry... Just add the s preg_match_all('|<p[^>]*>(.*)</p>|Uis', $myText, $myArray);____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ