🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #1515

Re: using grep to find one match per line

#1515
From: jongware
Date: Thu, 05 Feb 2009 12:18
12 lines
993 bytes
Eh. N-

How do you want to 'stop' grep? In JS, calling

      findGrep()




returns immediately, with the result of the search. That result is an array of found items, and the number of items indicate the number of occurrences found (0, 1, or more). There is nothing to stop.

You could use just the first found match of the results array in your script (I presume you need it for a certain 'use').
Technical Details
Message-ID: <59b7c67c.4@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <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!g2news1.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.4@webcrossing.la2eafNXanI>
Date: Thu, 5 Feb 2009 04:18:56 -0800
References: <59b7c67c.-1@webcrossing.la2eafNXanI>
Lines: 14
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit