🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1804

Re: MapStylesToTags script

#1804
From: federico_platon
Date: Sun, 18 Jan 2009 10:07
12 lines
1153 bytes
Loic,

Thank you, thank you very much. Yes it works perfectly, but it requires well formed names, style names cannot start with numbers, include some invalid characters or use spaces.

I would like to be able to start with names of paragraph styles that include an space between two words, and replace it with a low dash.

I think I should add a GREP search/replace, but the code strings I have found use a differnt syntax:

var myRegEx = new RegExp (' ', 'gi') ;
myStyleName = myStyleName.replace(myRegEx, '_');

Could you please adapt it? Again, Thanks in advance
Technical Details
Message-ID: <59b78a48.2@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
References: <59b78a48.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,9cb0961f903dcdf7
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: federico_platon@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: MapStylesToTags script
Message-ID: <59b78a48.2@webcrossing.la2eafNXanI>
Date: Sun, 18 Jan 2009 02:07:27 -0800
References: <59b78a48.-1@webcrossing.la2eafNXanI>
Lines: 16
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit