Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Parsing URL using regular expression

by Sec (Scribe)
on Jul 20, 2005 at 15:24 UTC ( #476525=note: print w/ replies, xml ) Need Help??

in reply to Parsing URL using regular expression

I suspect your mistake lies somewhere else. The above mentioned snipped works as expected and keeps the URL parameters:

#!perl -l $message_body=" Ddemo2&rid=3D0"; $message_body =~ s/=([0-9A-Fa-f]{2})/chr(hex($1))/ge; $message_body =~ s/=\n//g; $message_body =~ s/=3D/=/g; $message_body =~ s/>/>\n/g; print $message_body;
results in
While we're at it. the third substitute (the one with =3D) seems unnecessary, as the first substitute already transforms =3D into =.

Comment on Re: Parsing URL using regular expression
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-11-29 18:58 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (752 votes), past polls