(EREG string regular_expression) would return TRUE if string maches regular_expression and NIL otherwise.
Ex: (EREG "97000" "^([Ff][-_ �]?)?97[0-9]{3}$") => TRUE
(EREG "F97000" "^([Ff][-_ �]?)?97[0-9]{3}$") => TRUE
(EREG "F-98000" "^([Ff][-_ �]?)?97[0-9]{3}$") => NIL
(�) is a NBSP (SF interface does not allow hardcoding it)
As a real life example, following regular expression maches France (metropolis and Corsica) zip codes.
"^([Ff][-_ �]?)?((0[1-9])|([13-8][0-9])|(2[AaBb])|(9[0-5]))[0-9]{3}$"
There could also be a case-insensitive version of it:
(EREG* string regular_expression)) would have the same effects as (EREG) except that it would be case-insensitive.
(EREG* string "^[ab]$") or EREG* string "^[AB]$") would return same values as (EREG string "^[AaBb]$")