in reply to Matching set of paragraph tags with string inside.

my $re = qr/ <p> # paragraph-open ( # Capture (?: # group (?!<\/p>) # Make sure we aren't at a paragraph-close (?!\[tab\]) # and we're not at [tab] . # consume a char )* # any number of times \[tab\] # consume [tab] (hooray!) .*? # anything up to paragraph-close ) <\/p> /x;
Update: to not capture paragraph tags

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: Matching set of paragraph tags with string inside.
by the_0ne (Pilgrim) on Feb 08, 2008 at 21:30 UTC
    Thanks a lot for the code and explanation. I think this is exactly what I need. I'll mess with it some more and see if I can break it.