regex - parsing url parameters code=yes http://stackoverflow.com/questions/14679113/getting-all-url-parameters-using-regex (\?|\&)([^=]+)\=([^&]+) ----------------------------- #!/usr/bin/perl -wT my $str = "url.html?id=14114&yolo=hahaha"; while ( $str =~ m/(\?|\&)([^=]+)\=([^&]+)/igs ) { print "1 = $1\n"; print "2 = $2\n"; print "3 = $3\n"; } #regex