Is there any simple way to filter out a string in C using regular expressions?
Here is example how an invocation of such function re(regexp,str,outstr) could look like:
printf("%s\n", re("G*o", "Geraldo Gerardo German", outstr));
and will fill outstr with “Geraldo Gerardo”.
What is the most appropriate way to do it in C? To write my own function or to use an existed one (hope, multi-platform, so ANSI or any portable standard lib is preferable).
In a POSIX world,
#include <regex.h>should lead you to the standard POSIX regex library