| Updated: October 28, 2024 | 
Compile a regular expression
#include <unix.h> char *re_comp( char *s );
The re_comp() function converts a regular expression string (RE) into an internal form suitable for pattern matching. Use this function with re_exec().
The re_comp() and re_exec() functions support simple regular expressions. The regular expressions of the form \{m\}, \{m,\}, or \{m,n\} aren't supported.
NULL if the string pointed to by s was successfully converted. Otherwise, a pointer to one of the following error message strings is returned:
| Safety: | |
|---|---|
| Cancellation point | No | 
| Interrupt handler | No | 
| Signal handler | Yes | 
| Thread | Yes |