View Single Post
Old 04-26-2002, 12:53 PM   #12
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

re_exec() is another BSD function that evaluates a previously compiled regular expression against a string you pass to it.  I find it interesting that re_exec() is giving you problems but re_comp() is not -- if you don't call re_comp() at all, your re_exec() evaluation will always be 1 (true).

It's also possible that you don't have re_exec(), and will have to use some other method of checking.  I've found that many codebases have the nasty habit of manually declaring prototypes to functions that may not otherwise exist.  Try doing: grep "int re_exec" *.h to see if it's being manually declared, and if it is, remove it and use #include <regex.h> instead.

If your system does not support BSD regular expressions, you'll probably have to remove the check or roll your own profanity filter, which isn't hard.
Yui Unifex is offline   Reply With Quote