Re: Regex to wrap <a href=""> tag around a <p> tag
| From: | Kristen G. Thorson | Date: | Fri, 02 Dec 2005 18:26:39 +0000 |
| Subject: | Re: Regex to wrap <a href=""> tag around a <p> tag | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-226784@lists.php.net to get a copy of this message | ||
Shaun wrote:
Hi M, Thanks for your help, the code works fine except if there is a line break in the html, for example this works <p>test</p> But this doesnt <p>test </p> Any ideas?See the last user contributed note from *csaba at alum dot mit dot edu *at http://us3.php.net/manual/en/reference.pcre.pattern.modifiers.php, particularly the last paragraph. He gives a very good explanation of pattern modifiers that answers your question. kgt