🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1767

[JS CS3] Grep difficulty

#1767
From: loic_aigon
Date: Fri, 23 Jan 2009 21:58
15 lines
1159 bytes
Hi,
I succeeded creating a grep pattern which is used for a string replacement.
var myRegExp = new RegExp ("\..-.*.indd")

if the string is like this, it runs very well :
var x = "001296.01.A-ATELIER GLOTIN.indd";

but like this, it's not satisfying :
var x = "001296.01.ABC-ATELIER GLOTIN.indd";

I cant't get a grep search for a dot, any character n times, a dash, any character n times, a dot, and indd string.
if I do this, var myRegExp = new RegExp ("\..*-.*.indd"), it removes almost everything in the string

What I do wrong ? I am seraching on all grep sites but can't find any clue.
Thanks for light, Loic
Technical Details
Message-ID: <59b7a7d2.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,299eef9b874ccfc,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: loic_aigon <loic_aigon@yahoo.fr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [JS CS3] Grep difficulty
Message-ID: <59b7a7d2.-1@webcrossing.la2eafNXanI>
Date: Fri, 23 Jan 2009 13:58:18 -0800
Lines: 19
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit