Article View: adobe.scripting.indesign
Article #8465Is it possible to use variables in Regex?
From: harbs
Date: Tue, 03 Oct 2006 23:04
Date: Tue, 03 Oct 2006 23:04
10 lines
913 bytes
913 bytes
I have a regex like this:
myChars = myStory.contents.match( /[(][^)]{1,20}[)]+/g );
I would like to replace the "(" with myPrefix, ")" with mySuffix, and the 20 with myNumber.
Is there any way to do this?
Thanks,
Harbs
Technical Details
Message-ID:
<3bc1dce1.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,35e61f302ee28709 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: harbs@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Is it possible to use variables in Regex? Message-ID: <3bc1dce1.-1@webcrossing.la2eafNXanI> Date: Tue, 3 Oct 2006 16:04:30 -0700 Lines: 11 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit