in reply to Re: (jeffa) Re: A regex I cant get my head around
in thread A regex I cant get my head around
Regardless of whether or not this has to do with GET params, you can still use URI to parse any key=value pairs that are delimited by ampersands:my $as_string = 'startKEY=jdjhjfg8y4uh449845&finish'; $as_string =~ /KEY=([^&]+)\&/; print $1, "\n";
use strict; use URI; my $uri = URI->new(); $uri->query('startKEY=jdjhjfg8y4uh449845&finish'); my %pair = $uri->query_form(); print $pair{startKEY}, "\n";
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|