Article View: adobe.scripting.indesign
Article #9918Re: Help needed with regular expression.
From: Jerker_Dahlblom
Date: Thu, 13 Jul 2006 06:57
Date: Thu, 13 Jul 2006 06:57
14 lines
1146 bytes
1146 bytes
I've tried:
for(z=0;z<app.activeDocument.stories.length;z++){
story = app.activeDocument.stories[z];
searchResults = story.contents.match(/\t[0-9]+\.[0-9]{2,}$/g);
if(searchResults != null){
app.findPreferences = app.changePreferences = null;
for(i=0;i<searchResults.length;i++){ story.search(searchResults[i],true,true,''); } }
}
all I get is the error: story.contents.match is not a function (searchResults = story.contents.match(/\t[0-9]+\.[0-9]{2,}$/g);)
Why is it not working?
Technical Details
Message-ID:
<3bc0dfb6.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.datemas.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossingReferences:
<3bc0dfb6.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,8bed2397d36f00d4 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Jerker_Dahlblom@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: Re: Help needed with regular expression. Message-ID: <3bc0dfb6.3@webcrossing.la2eafNXanI> Date: Wed, 12 Jul 2006 23:57:01 -0700 References: <3bc0dfb6.-1@webcrossing.la2eafNXanI> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.datemas.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing