Article View: adobe.scripting.indesign
Article #1511Re: using grep to find one match per line
From: jongware
Date: Thu, 05 Feb 2009 11:02
Date: Thu, 05 Feb 2009 11:02
25 lines
1017 bytes
1017 bytes
Sure. Let GREP find an entire line at once:
^.*sin.*$
But it won't work, I'm afraid. You insist that looking for "sin" will find a match in "SG SIN Singapore"; and not one but two. It won't. Try it.
__
(..)
_\
Got that? So use the 'case insensitive' switch
(?i)^.*sin.*$
or (perhaps better, in this case), as you seem to search for the three letter codes, use
^.*\<SIN\>.*$
Technical Details
Message-ID:
<59b7c67c.2@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7c67c.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,b814e9ccdc1964a X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: jongware@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: using grep to find one match per line Message-ID: <59b7c67c.2@webcrossing.la2eafNXanI> Date: Thu, 5 Feb 2009 03:02:52 -0800 References: <59b7c67c.-1@webcrossing.la2eafNXanI> Lines: 19 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit