What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] variables into regular expressions

[?] variables into regular expressions
Author: Message:
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [?] variables into regular expressions
You can create a regular expression from a string:

code:
// Create a string to store the pattern of our regular expression
var sRegExp = "[abc]+";
// Create a RegExp object with the pattern as sRegExp and the flags as "i" (case insensitivity)
var rRegExp = new RegExp(sRegExp, "i");

You can insert variables in the string.

This post was edited on 02-11-2007 at 12:56 AM by deAd.
02-11-2007 12:54 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] variables into regular expressions - by roflmao456 on 02-11-2007 at 12:19 AM
RE: [?] variables into regular expressions - by deAd on 02-11-2007 at 12:54 AM
RE: [?] variables into regular expressions - by roflmao456 on 02-11-2007 at 02:20 AM
RE: RE: [?] variables into regular expressions - by deAd on 02-11-2007 at 02:35 AM
RE: [?] variables into regular expressions - by roflmao456 on 02-11-2007 at 02:40 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