| Name: | regcomp - Create a regular expression
|
| Synopsis: | string integer regcomp -> regex
string regcomp -> regex
|
| Description: |
regcomp will prepare a regular expression to be used with regexec.
Any allowed flags are found in dictionary regexdict.
|
| Parameters: | in: string: defining the regular expression,
integer: flag, see Remarks. If in doubt, choose second
call of regcomp which presets integer to REG_EXTENDED.
out: the regular expression object
|
| Examples: | 1) (.*) regcomp ->
2) regexdict begin
(\() REG_EXTENDED regcomp ->
|
| Diagnostics: |
If the string cannot be converted to a regular expression,
an error message is displayed and /InvalidRegexError is raised.
| Variants: | |
The variant "regcomp_" never raises an error, but returns:
-> regex true
-> regex integer false
In case of an error, the regex error code is returned as an integer.
This error code can be translated to a string using ":regerror" (see there).
|
| Author: | Diesmann & Hehl, R Kupper (added error handling)
|
| FirstVersion: | 27.9.99
|
| Remarks: | See man regcomp for futher details on POSIX regcomp.
| SeeAlso: | regexec :regerror |
|
| Source: | /home/abuild/rpmbuild/BUILD/nest-2.4.1/lib/sli/regexp.sli
|