regularexpression(3W)
NAMES
streexp, strexp, strrexp
SYNOPSIS
#include <Xol/regexp.h>
. . .
extern char ∗streexp( void )
#include <Xol/expcmp.h>
. . .
extern char ∗strexp(
char ∗string,
char ∗curp,
char ∗expression);
#include <Xol/expcmp.h>
. . .
extern char ∗strrexp(
char ∗string,
char ∗curp,
char ∗expression);
DESCRIPTION
These functions use a regular expression notation consisting of:
| element | meaning | |
| c | match c | |
| [<set>] | match any character in <set> | |
| [!<set>] | match any character not in <set> | |
| ∗ | match any character(s) | |
| ^ | match must start at curp |
streexp
The streexp function is used to retrieve the pointer of the last character in a match found following a strexp or strrexp function call.
strexp
The strexp function is used to perform a regular expression forward scan of string for expression starting at curp
Return
NULL is returned if expression cannot be found in string; otherwise a pointer to the first character in the substring which matches expression is returned. The function streexp can be used to get the pointer to the last character in the match.
strrexp
The strrexp function is used to perform a regular expression backward scan of string for expression starting at curp.
Return
NULL is returned if expression cannot be found in string; otherwise a pointer to the first character in the substring which matches expression is returned. The function streexp can be used to get the pointer to the last character in the match.
SEE ALSO
buffer(3W), textbuffer(3W), textedit(3W), textfield(3W)
OLIT Widget Set — Last change: Version 3.0.1