Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!samsung!olivea!uunet!lll-winken!xanth!cs.odu.edu!kremer From: kremer@cs.odu.edu (Lloyd Kremer) Newsgroups: comp.lang.c Subject: Re: Wanted: string matching routine Message-ID: <1991Jun27.122405.8383@cs.odu.edu> Date: 27 Jun 91 12:24:05 GMT References: <2868E3EF.6133@ics.uci.edu> Sender: news@cs.odu.edu (News File Owner) Organization: Old Dominion University, Norfolk, VA Lines: 17 Nntp-Posting-Host: wisteria.cs.odu.edu In article <2868E3EF.6133@ics.uci.edu> vahid@vesta.ics.uci.edu (Frank Vahid) writes: >Does anyone have a routine which is similar to strcmp, but permits >unix-type wildcard characters in at least one of the strings? >For example, strmatch("abc*", "abcdefg") would return a value denoting >a successful match. So would strncmp("abc", "abcdefg", 3). While there is no wildcard capability in the str* routines, it is fairly easy to combine them to produce the desired result. Some almost have a 'grep' type of action like finding a substring within a string. Lloyd Kremer Hilton Systems, Inc. kremer@cs.odu.edu