Best way to program string matching in C?

theGlove

Senior member
Jan 13, 2005
884
0
0
Hi All,
I would like to write a unix C/C++ program that can search strings with wildcards,
ie, if I had the string "Nothing spoken like the truth" and I had a search string "spoken * the *", then the string search should match.

does this make sense? Is there a library I could use (maybe perl like) to do this?
thanks
 

bersl2

Golden Member
Aug 2, 2004
1,617
0
0
Just use the POSIX regexes that come with glibc; read regcomp(3) and regex(7).