diff options
Diffstat (limited to 'man3/regex.3')
-rw-r--r-- | man3/regex.3 | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/man3/regex.3 b/man3/regex.3 index d0cfc040..6cecf1bd 100644 --- a/man3/regex.3 +++ b/man3/regex.3 @@ -51,13 +51,13 @@ regcomp, regexec, regerror, regfree \- POSIX regex functions .xx \w'\fBvoid\ regfree(\fR' .BI "void\ regfree(regex_t *" preg ); .SH "POSIX REGEX COMPILING" -.B regcomp +.BR regcomp () is used to compile a regular expression into a form that is suitable for subsequent -.B regexec +.BR regexec () searches. -.B regcomp +.BR regcomp () is supplied with .IR preg , a pointer to a pattern buffer storage area; @@ -68,9 +68,9 @@ flags used to determine the type of compilation. All regular expression searching must be done via a compiled pattern buffer, thus -.B regexec +.BR regexec () must always be supplied with the address of a -.B regcomp +.BR regcomp () initialized pattern buffer. .I cflags @@ -89,7 +89,7 @@ Basic Regular Expression syntax is used. .TP .B REG_ICASE Do not differentiate case. Subsequent -.B regexec +.BR regexec () searches using this pattern buffer will be case insensitive. .TP .B REG_NOSUB @@ -99,7 +99,7 @@ The and .I pmatch parameters to -.B regexec +.BR regexec () are ignored if the pattern buffer supplied was compiled with this flag set. .TP .B REG_NEWLINE @@ -115,7 +115,7 @@ matches the empty string immediately after a newline, regardless of whether .IR eflags , the execution flags of -.BR regexec , +.BR regexec (), contains .BR REG_NOTBOL . @@ -127,7 +127,7 @@ whether contains .BR REG_NOTEOL . .SH "POSIX REGEX MATCHING" -.B regexec +.BR regexec () is used to match a null-terminated string against the precompiled pattern buffer, .IR preg . @@ -150,7 +150,7 @@ compilation flag .B REG_NEWLINE above) This flag may be used when different portions of a string are passed to -.B regexec +.BR regexec () and the beginning of the string should not be interpreted as the beginning of the line. .TP @@ -169,7 +169,7 @@ must be dimensioned to have at least .I nmatch elements. These are filled in by -.BR regexec +.BR regexec () with substring match addresses. Any unused structure elements will contain the value \-1. @@ -200,14 +200,14 @@ substring match within the string. The relative .I rm_eo element indicates the end offset of the match. .SH "POSIX ERROR REPORTING" -.B regerror +.BR regerror () is used to turn the error codes that can be returned by both -.B regcomp +.BR regcomp () and -.B regexec +.BR regexec () into error message strings. -.B regerror +.BR regerror () is passed the error code, .IR errcode , the pattern buffer, @@ -229,23 +229,23 @@ is filled in with the first characters of the error message and a terminating null. .SH "POSIX PATTERN BUFFER FREEING" Supplying -.B regfree +.BR regfree () with a precompiled pattern buffer, .I preg will free the memory allocated to the pattern buffer by the compiling process, -.BR regcomp . +.BR regcomp (). .SH "RETURN VALUE" -.B regcomp +.BR regcomp () returns zero for a successful compilation or an error code for failure. -.B regexec +.BR regexec () returns zero for a successful match or .B REG_NOMATCH for failure. .SH ERRORS The following errors can be returned by -.BR regcomp : +.BR regcomp (): .TP .B REG_BADBR Invalid use of back reference operator. |