Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!rutgers!otello!gear!cadlab!staff From: staff@cadlab.sublink.ORG (Alex Martelli) Newsgroups: comp.lang.c Subject: Re: wildcard matching Message-ID: <584@cadlab.sublink.ORG> Date: 3 Jan 91 14:03:22 GMT References: <4739.277BA2FB@urchin.fidonet.org> <579@cadlab.sublink.ORG> <14267@june.cs.washington.edu> Organization: CAD.LAB, Bologna, Italia Lines: 26 slh@wolf.cs.washington.edu (Scott Heyano) writes: :In article <579@cadlab.sublink.ORG> staff@cadlab.sublink.ORG (Alex Martelli) writes: :|Tony.Bielobockie@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@cadlab.sublink.org, (home:) alex@am.sublink.org Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434; Fax: ++39 (51) 366964 (work only), Fidonet: 332/401.3 (home only).