wildcard matching

Alex Martelli staff at cadlab.sublink.ORG
Fri Jan 4 01:03:22 AEST 1991


slh at wolf.cs.washington.edu (Scott Heyano) writes:
:In article <579 at cadlab.sublink.ORG> staff at cadlab.sublink.ORG (Alex Martelli) writes:
:|Tony.Bielobockie at urchin.fidonet.org (Tony Bielobockie) writes:
:|
:[...]
:|>trailing the '*' character is ignored anyway, at least in MS-DOS, and
:|>OS/2. What need is there for further checking if a '*' character is
:|>encountered?  Does that hold true in the UNIX would too?
:|
:|I know that MSDOS and OS/2 consider that, when typing "a*b" or "a*c",
:|the user was just being funny, and he _actually_ meant just "a*" in
:|either case... presumably the extra letter, or letters, having been
:|typed just to keep his or her fingers in exercise?-)
:|
:	This is not true of OS/2.

Oops, sorry, Scott is right, Tony was wrong, and I was silly for
accepting Tony's "and OS/2" bit at face value instead of checking!  I
*did* check, now, and at least CMD.EXE gets it right - DIR T*P, in
particular, only lists files whose names begin with T ***AND*** END WITH
P.  One more reson to do wildmatch() right, then!
-- 
Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 53, Bologna, Italia
Email: (work:) staff at cadlab.sublink.org, (home:) alex at am.sublink.org
Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434; 
Fax: ++39 (51) 366964 (work only), Fidonet: 332/401.3 (home only).



More information about the Comp.lang.c mailing list