HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
r
regcmp(3X) regcmp(3X)
(TO BE OBSOLETED)
char *cursor, *newcursor, *ptr;
...
newcursor = regex((ptr = regcmp("ˆ\n", 0)), cursor);
free(ptr);
Match through the string Testing3 and return the address of the character after the last matched char-
acter (cursor+11). The string Testing3 will be copied to the character array ret0.
char ret0[9];
char newcursor, *name;
...
name = regcmp("([A -Za-z][A-Za-z0-9_]{0,7})$0", 0);
newcursor = regex(name, "123Testing321", ret0);
WARNINGS
User programs that use regcmp() might run out of memory if regcmp() is called iteratively without
freeing vectors that are no longer required.
Obsolescent Interfaces
regcmp() and regex() are to be obsoleted at a future date.
SEE ALSO
ed(1), malloc(3C), regcomp(3C).
Section 3754 2 HP-UX Release 11i: December 2000
___
___