🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8171

Re: Regular Expression and $

#8171
From: Dave_Saunders
Date: Fri, 03 Nov 2006 17:56
8 lines
872 bytes
I think you need:

re = new RegExp("\\$Pos_x","gi")
MyString= MyString.replace(re , "!");

when you use a string to make a RegExp object that has the backslash as a real character because it is a JavaScript escape character too.

Dave
Technical Details
Message-ID: <3bc22ba4.6@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.germany.com!news.mb-net.net!open-news-network.org!news.isoc.lu!webcrossing
References: <3bc22ba4.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,c13ae6874b3af8e5,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.germany.com!news.mb-net.net!open-news-network.org!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Regular Expression and $
Message-ID: <3bc22ba4.6@webcrossing.la2eafNXanI>
Date: Fri, 3 Nov 2006 09:56:04 -0800
References: <3bc22ba4.-1@webcrossing.la2eafNXanI>
Lines: 9
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit