Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: auto-simplify URLs

by SFLEX (Chaplain)
on Oct 30, 2007 at 17:48 UTC ( [id://648072]=note: print w/replies, xml ) Need Help??


in reply to auto-simplify URLs

just messing around hehe.
but this could be usefull some day.
my $string = '<a href=\'http://www.perlmonks.org/?node_id=646560">here +</a>'; $string =~ s{<a href=(?:\"|\')*(?:\w+\://)*(?:www.)*perlmonks\.org/\?n +ode_id=(\d+)(?:\"|\')*>([a-zA-Z\d\s\:\.\/\_\-]+)</a>}{[id://$1|$2]}gs +;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-25 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found