regexp.3x (2010 09)

r
regexp(3X) regexp(3X)
such as s/y*//g do not loop forever.
The additional external variables
sed and nbra are used for special purposes.
EXTERNAL INFLUENCES
Locale
The
LC_COLLATE category determines the collating sequence used in compiling and executing regular
expressions.
The
LC_CTYPE category determines the interpretation of text as single and/or multi-byte characters,
and the characters matched by character class expressions in regular expressions.
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
The following is an example of how the regular expression macros and calls look from grep (1):
#define INIT register char *sp = instring;
#define GETC() (*sp++)
#define PEEKC() (*sp)
#define UNGETC(c) (--sp)
#define RETURN(c) return;
#define ERROR(c) regerr()
#include <regexp.h>
...
(void) compile(*argv, expbuf, &expbuf[ESIZE], ’\0’);
...
if (step(linebuf, expbuf))
succeed();
SEE ALSO
grep(1), regcomp(3C), setlocale(3C), regexp(5).
STANDARDS CONFORMANCE
advance(): AES, SVID2, SVID3, XPG2, XPG3, XPG4
compile(): AES, SVID2, SVID3, XPG2, XPG3, XPG4
loc1: AES, SVID2, SVID3, XPG2, XPG3, XPG4
loc2: AES, SVID2, SVID3, XPG2, XPG3, XPG4
locs: AES, SVID2, SVID3, XPG2, XPG3, XPG4
step(): AES, SVID2, SVID3, XPG2, XPG3, XPG4
HP-UX 11i Version 3: September 2010 3 Hewlett-Packard Company 3