View Single Post
  #5  
Old 09-13-2006, 12:13 PM
quasi quasi is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
quasi is on a distinguished road
Default

I agree with browny
and, since you can't nest p tags... you just need to make sure your regex is "ungreedy" by using a U modifier.
I can't remember if < and > are special in regex, so one of the following should work...
Code:
$pattern = '/\<p\>(.+)\<\/p\>/isU';
//or
$pattern = '/<p>(.+)<\/p>/isU'; -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - \r\n inside <p></p> tags. Removel ?
View Single Post
  #5  
Old 09-13-2006, 12:13 PM
quasi quasi is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
quasi is on a distinguished road
Default

I agree with browny
and, since you can't nest p tags... you just need to make sure your regex is "ungreedy" by using a U modifier.
I can't remember if < and > are special in regex, so one of the following should work...
Code:
$pattern = '/\<p\>(.+)\<\/p\>/isU';
//or
$pattern = '/<p>(.+)<\/p>/isU'; -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote