Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Regular Expresion

by citromatik (Curate)
on May 14, 2009 at 11:07 UTC ( #764058=note: print w/ replies, xml ) Need Help??


in reply to Regular Expresion

Another possibility using split's:

use 5.010; use strict; use warnings; while (<DATA>){ chomp; my %ps = map {my @k = split /=/; $k[0] => $k[1]} split /&/,(split /\ +?/)[1]; say "username = $ps{username}; id=$ps{id}" } __DATA__ http://beta.websitename.com/tool/view/mb/file?username=anirudh007&id=4 +3242342 http://beta.websitename.com/tool/view/mb/file?id=3323213&username=anir +udh007
username = anirudh007; id=43242342 username = anirudh007; id=3323213

citromatik


Comment on Re: Regular Expresion
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-07-29 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls