You're viewing old version number 2. - Current version Regex - parsing url parameters regex - parsing url parameters 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 From JR's : articles 35 words - 384 chars created on Nov 14, 2014 at 02:02:44 pm updated on Nov 14, 2014 at 02:20:09 pm - # source - versions