What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Regex with Variables

Regex with Variables
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
O.P. Regex with Variables
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
[Image: adsig.jpg]
11-19-2008 06:05 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Regex with Variables - by ArkaneArkade on 11-19-2008 at 06:05 AM
RE: Regex with Variables - by Mnjul on 11-19-2008 at 10:32 AM
RE: Regex with Variables - by ArkaneArkade on 11-19-2008 at 12:26 PM
RE: Regex with Variables - by ArkaneArkade on 11-19-2008 at 11:36 PM
RE: Regex with Variables - by andrewdodd13 on 11-20-2008 at 08:29 AM
RE: Regex with Variables - by ArkaneArkade on 11-20-2008 at 04:13 PM
RE: Regex with Variables - by ArkaneArkade on 11-21-2008 at 07:08 AM
RE: Regex with Variables - by Matti on 11-21-2008 at 04:41 PM
RE: Regex with Variables - by ArkaneArkade on 11-22-2008 at 11:51 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On