Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Regular Expression Problem

by elusion (Curate)
on Aug 29, 2002 at 02:46 UTC ( #193645=note: print w/replies, xml ) Need Help??


in reply to Regular Expression Problem

You should probably use a module for this, but I'll answer anyway (I'm a re-invent the wheel person myself). You needn't escape the <>'s. Also, there can be attributes between the "a" and the "href", so you need to use a ".". I've updated the regex and hopefully made it a little cleaner too.
$remainder =~ s/< \s*? a \s .*? href .*?>//xi;

elusion : http://matt.diephouse.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2019-07-15 20:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?