🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11591

Re: Wildcard Support in dos.library

#11591
From: Peter da Silva
Date: Sat, 25 Feb 1989 16:02
26 lines
1754 bytes
(moved to tech... I'm getting pretty technical here)

In article <9499@louie.udel.EDU>, AXTBF%ALASKA.BITNET@cunyvm.cuny.edu (Tim Friest - programmer at large) writes:
> I don't see where you want to do string pattern matching using the DOS
> string pattern matching patterns outside of DOS???

How about in an editor? The AmigaDOS regular expressions are, I think, fully
equivalent to the UNIX 'ed' regular expressions. That is, anything you can
express in 'ed' regexps you can express in AmigaDOS regexps. In fact, I think
they're more powerful, since they have alternation... which 'ed' doesn't.

For example, how would you specify "(if|for|while|do|switch)" in ed?

Yes, they're always fully anchored. That's probably repairable. Look at the
Software tools routines: MATCH is defined in terms of AMATCH, which is an
anchored match.

The only problem with the AmigaDOS wildcards is that the escape character
(literal quote character: "*" in AmigaDOS, "\" in UNIX, and "@" in the Software
Tools book) is overloaded by DOS as a synonym for Input() and Output(). It's
not too late to switch to the more common backslash in the next release of
DOS. Almost no third-party programs implement it anyway, so there's room to
set a better standard... one which is more likely to be followed.
-- 
Peter "Have you hugged your wolf today" da Silva  `-_-'  Hackercorp.
...texbell!sugar!peter, or peter@sugar.uu.net      'U`
Technical Details
Message-ID: <3514@sugar.uu.net>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sugar!peter
References: <9499@louie.udel.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!sugar!peter
From: peter@sugar.uu.net (Peter da Silva)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Wildcard Support in dos.library
Message-ID: <3514@sugar.uu.net>
Date: 25 Feb 89 16:02:19 GMT
References: <9499@louie.udel.EDU>
Organization: Sugar Land Unix - Houston, TX
Lines: 26