Allocates memory and initializes the structure for processing matching operation with regular expressions.
IppStatus ippsRegExpInitAlloc(const char* pPattern, const char* pOptions, IppRegExpState** ppRegExpState, int* pErrOffset);
pPattern |
Pointer to the pattern of regular expression. |
pOptions |
Pointer to options for compiling and executing regular expressions (possible values i, s, m, x, g). It must be NULL if no options are required. |
ppRegExpState |
Double pointer to the structure containing internal form of a regular expression. |
pErrOffset |
Pointer to the offset in the pattern if compiling is break. |
The function ippsRegExpInitAlloc is declared in the ippch.h file. This function allocates memory and initializes a regular expression state structure ppRegExpState. The function compiles the initial pattern of regular expressions pPattern in accordance with the compiling options specified by pOptions, converts it to the specific internal form, and stores it in the initialized structure. This structure is used by the function ippsRegExpFind to perform matching operation.
If the compiling is not completed, the function returns the pointer pErrOffset pointed to the position in the pattern where the compiling is interrupted.
Code example shows how to use the function ippsRegExpInitAlloc.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error condition if one of the specified pointers is NULL. |
ippStsRegExpOptionsErr |
Indicates an error if specified options are incorrect |
ippStsRegExpQuantifierErr |
Indicates an error if the quantifier is incorrect |
ippStsRegExpGroupingErr |
Indicates an error if the grouping is incorrect |
ippStsRegExpBackRefErr |
Indicates an error if the back reference is incorrect |
ippStsRegExpChClassErr |
Indicates an error if the character class is incorrect |
ippStsRegExpMetaChErr |
Indicates an error if the metacharacter is incorrect |
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.