I'm guessing that you are trying to parse parameters passed into a CGI script. If this is the case, you should not be using a Regex, but the CGI module instead and looking at the params passed in. I would suggest taking a look at
Ovid's Web Programming With Perl course.