Q:

Quick Regex Question

Could someon please show me a regex which matches everything like: image.php?type=regcheck&imagehash=3d600fe2ad3c87c9b22ade7e58ef1c48
this string is contained in a page source..
thanks. :)
edit: here is the place where it is located:
<img id="imagereg" src="image.php?type=regcheck&amp;imagehash=3d600fe2ad3c87c9b22ade7e58ef1c48" alt="Registration Image" border="0" height="61" width="201">

A:

If the hash is the only thing that varies, you replace it with a .*, and escape all existing . and ? with \ since it's a regex special char... so, something like:
image\.php\?type=regcheck&imagehash=.*

Also note that .* can be 'greedy' and take too much of the input - I don't know what you're parsing with regex (some part of the text would help), but maybe a single space after the star would do the trick...
edit: Based on your comment, the regex comes down to:
"image\.php\?type=regcheck&imagehash=.*"

with the " belonging inside the regex, as in:
 string regexExpression = "\"image\.php\?type=regcheck&imagehash=.*\""

