RegCompEx()

Syntax

Result = RegCompEx(*PtrReg, Exp$)

Description

RegCompEx compiles a regular expression in Exp$ into a structure of type REGEXP, and puts the pointer to it into *PtrReg. (*PtrReg is a pointer to a pointer to a REGEXP structure)
Returns 0 on success. If it fails, a error code is returned.

The REGEXP Structure (internal use):

Structure REGEXP
    regnsubexp.l
    regstart.b
    reganch.b
    *regmust.b
    regmlen.l
    program.b[1]
EndStructure

Error codes:

#REGEXP_BADARG = -1 ; bad argument--NULL pointer Or such
#REGEXP_ESIZE         = -2 ; regexp too big
#REGEXP_ESPACE = -3 ; out of memory
#REGEXP_EPAREN = -4 ; unmatched )
#REGEXP_ERANGE  = -5 ; invalid [] range
#REGEXP_EBRACK = -6 ; unclosed [
#REGEXP_BADRPT = -7 ; *+? follows nothing
#REGEXP_EESCAPE = -8 ; trailing backslash
#REGEXP_EEND = -99 ; unspecified internal error

 

In case of an error, a additional message is send to the active windows debugger via Win32 OutputDebugString(). This message can be displayed with programs like Sysinternals DebugView.

Supported OS

Linux

RegExpEx - Index