Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!julius.cs.uiuc.edu!usc!samsung!uunet!csun!news From: swalton@solaria.csun.edu (Stephen Walton) Newsgroups: comp.sys.amiga.programmer Subject: Re: AmigaDOS patterns with '~' Message-ID: <1991Jan29.172553.421@csun.edu> Date: 29 Jan 91 17:25:53 GMT References: <04348.AA04348@ami-cg.UUCP> <17879@cbmvax.commodore.com> <18132@cbmvax.commodore.com> Sender: news@csun.edu (News Administrator) Reply-To: swalton@solaria.csun.edu (Stephen Walton) Organization: Cal State Northridge Lines: 18 In-Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) In article <18132@cbmvax.commodore.com>, jesup@cbmvax (Randell Jesup) writes: > There was supposed to be a specific hack in the patternmatch code >to do something special with a final ~. Certainly it shouldn't silently >eat it (VERY bad). I'll look into it; I agree with Randell's later comment that regular expressions can be mind warping. However, the behavior of the final ~ is consistent, I think. Since ~ NOT's the following expression, the string #?~ matches everything (that is, it matches all file names which consist of any string followed by not-the-null-string). The best fix is probably to modify Emacs-ish editors to use a different backup scheme so they don't collide with an Amiga wildcard character. After all, you wouldn't end your backups on Unix with an asterisk, would you :-) ? Steve