TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: GEORGE DE BRUIN
date: 1997-05-09 01:06:00
subject: RE: Find() n times?

From: George De Bruin 
"tsepro@semware.com"	 
Editor.)
On Wednesday, May 07, 1997 11:48 AM, Frederick Holmes 
[SMTP:fsholmes@cpcug.org] wrote:
>   Can one do a Find (with Ctrl-F, or with Find()) a specific number
>   of times?  One seems to be able to do a replace a specific number
>   of times, but not a find.  At least I don't seem to find it on
>   the help screen as an option parameter for Find().  It also
>   doesn't seem to be a feature of regular expressions.
It's not a built in feature...  But it could me macro'd pretty easily:
proc findx()
    string target[80] = "", Times[3] = "", opts[12] = ""
    integer i
	if ask("Find what?", target, _FIND_HISTORY_) and length(target)
       ask("Options?", opts, _FINDOPTIONS_HISTORY_)
        if lFind(target, opts+"gc")
            if ask("How many times?", times)
                for i = 1 to val(times) - 1
                    lRepeatFind()
                endfor
            endif
        else
            warn(target, " not found on current line.")
        endif
    endif
end
   findx()
>> Qedit (Fidonet) > Qedit (Internet Mailing list)           >>
>> To post a message send to qedit@sawasdi.apana.org.au                    >>
>> For listserv information send an email to listserv@sawasdi.apana.org.au >>
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.