Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regular Expression Problem

by elusion (Curate)
on Aug 29, 2002 at 02:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://193645]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found