i'm having troubles figuring out a way to find ".doc" files in a given directory. I know c++ one can use regex and its delimiters to find all .txt files but what can be used to find .txt files in C?
i'm having troubles figuring out a way to find ".doc" files in a given directory. I know c++ one can use regex and its delimiters to find all .txt files but what can be used to find .txt files in C?
First compile the regexp w/ regcomp(); then use regexec() to compare each dir entry.
See the manpages of regcomp() and regexec() for more information.
On POSIX compatible systems, regex.h which was already mentioned. Don't know about other systems.