Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!att!westmark!mole-end!mat From: mat@mole-end.UUCP (Mark A Terribile) Newsgroups: comp.lang.c Subject: Re: wildcard matching Summary: ... 498. UNIX ain't DOS. 499. UNIX ain't DOS. 500. UNIX ain't DOS. Message-ID: <462@mole-end.UUCP> Date: 1 Jan 91 03:34:42 GMT References: <4739.277BA2FB@urchin.fidonet.org> Organization: mole-end--private system. admin: mole-end!newtnews Lines: 21 (On the subject of wildcard patterns whose match is pathalogical in time ...) > I think that the recursive call is unnessicary. Consider that anything > 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? In UNIX, the `*' is NOT limited to matching a whole name component, but instead any sequence of characters, anywhere. Thus, one can write a*b*c If you want to guarantee efficient matching, then I think you have to generate a DFSA. If you want to come close, you can put some pathology checks in your code (like `*' after `*'). And there are publicly available regex-like matchers, most of which will want .* for a closure on an arbitrary character. Some of them might not be too hard to change. -- (This man's opinions are his own.) From mole-end Mark Terribile