![]() |
![]() |
![]() |
Execute a regular expression
#include <unix.h> int re_exec( char *s );
libc
The re_exec() function compares the string pointed to by the string argument with the last regular expression passed to re_comp().
Strings passed to both re_comp() and re_exec() must be terminated by a null byte, and may include newline characters.
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.
![]() |
For better portability, use regcomp(), regerror(), and regexec() instead of these functions. |
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
re_comp(), regcomp(), regerror(), regexec()
grep in the Utilities reference
![]() |
![]() |
![]() |