Re: regular expressions and variables in JScript

Date : Thu, 4 May 2006 12:19:55 +0200
To : XSI(at)Softimage.COM
From : "guillaume laforge" <guillaume.laforge.3d(at)gmail.com>
Subject : Re: regular expressions and variables in JScript
I'm not very friendly with regex but I use something like this in a script to change image file path :

>
var reg=new RegExp("[\\\\]+", "g");
var Slct = new String(oName);
tmp = Slct.split(reg);
TheName = tmp[tmp.length-1];
NewName = "F:\\_MAPS_FF\\"+TheName;

LogMessage(NewName);

Does it help ?

Cheers.

--
Guillaume Laforge
freelance TD | cg Artist


On 5/4/06, Sascha Robitzki <s.robitzki(at)trixter.de> wrote:
How can I put a variable into a regular _expression_ in JScript?

Thanks,
Sascha







Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.