tags:

views:

79

answers:

2

Hello, I am new to regex and am trying to extract from a database a list of URLs that match xyz.asp? followed by any eight digit RequestID numbers. I can't figure out what is wrong with my expression: /abcd/..asp\?\w+=.?[0-9]*?

Example: http://domain.com/abcd/xyz.asp?RequestID=20100401

Do I have it wrong with 1) not starting/ending with ^$ 2) escaping the dot 3) escaping the question mark 4) matching the equals sign 5) or something else?

Thank you

A: 

If all the urls are in that format, you could just split the string at the "=" and get the 2nd returned item.

GuidoH
A: 

I don't understand the first part ( /abcd/..asp )

Why don't you just use

(.*)\.asp\?\w+=.?[0-9]*
nico
nico, this seems to work. Thanks so much!
Ron