how to refer to the ERR_regex or ERR_regex_2 constant
As keskiverto pointed out, what you have are preprocessor macros. The preprocessor will replace any occurance of ERR_regex with the specified quoted string. keskiverto's example of representing constant string is preferred over using defines.
To answer your question though, the compiler will treat those quoted strings (either your define, or keskiverto's example) as constchar *. Therefore, your function needs to accept a constchar * argument.
1 2 3 4
void error (constchar * msg, int eno) // changed eno from pointer to int value
{ cout << "error" << msg;
exit(eno);
}