Hey guys,
Its been a day, so I'm back again with another stupid question. I'm looking for some help, and to find out if its possible to regex a variable.
I know the basic idea is to looks for a pattern, but I'm trying to get something with a little more choice.
Basically, in my script I have a radio box, which will set a variable to be either "One", "Two" or "Three" (yes, it's dumbed down, not because you guys need it, but its easier to explain). I then download a webpage, which has various bits of info, including 3 images, each with an id of "One", "Two" or "Three".
I've managed to use the regex (with my severely limited understanding) to download the image with id "One" using
jscript code:
new RegExp(/<img id="One" src="(.*?)">/i);
However, since I intend to add a lot more options for hte ids, I'm looking for a way to get them in the regexp as the variable, but I don't understand how that would be done, since I'm confused enough by the lack of quotes.
Can anyone help me?
Cheers as always guys,
Leroux