Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Matching set of paragraph tags with string inside.

by Roy Johnson (Monsignor)
on Feb 08, 2008 at 21:13 UTC ( [id://667071]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://667071]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found