RegExpMultiFind

Looks for the occurrences of the substrings matching the multiple pattrerns.

Syntax

IppStatus ippsRegExpMultiFind_8u(const Ipp8u* pSrc, int srcLen, IppRegExpMultiFind* pDstMultiFind, const IppRegExpMultiState* pState);

Parameters

pSrc

Pointer to the source string.

srcLen

Number of elements in the source string.

pDstMultiFind

Array of pointers to the matching patterns.

pState

Pointer to the state structure for the multi-pattern search engine.

Description

The function ippsRegExpMultiFind is declared in the ippch.h file. This function searches through the srcLen elements of the source string pSrc for substrings that match each pattern from the database in the state structure pState for multiple patterns search engine. This state structure must be initialized by the functions ippsRegExpMultiInit or ippsRegExpMultiInitAlloc beforehand.

Results of the search are stored in the array of structures pDstMultiFind of type IppRegExpMultiFind. The structure has the following fields:

typedef structure {

Ipp32u regexpDoneFlag;

Ipp32u regexpID;

Ipp32s numMultiFind ;

IppStatus status;

IppRegExpFind* pFind;

Ipp32s numMultiFind

}IppRegExpMultiFind;

For each element of the array pDstMultiFind:

numMultiFind - input value specifies the size of the array pFind, output value indicates the number of substrings matching for the pattern regexpID.

pFind - specifies the offset of the pointer to the matching substring, and the lenFind entry of pFind specifies number of elements in the matching substring. If the substring matches completely, pFind [0] points to the whole regular expression, pFind[1] points to the substring that matches the first grouping, pFind[2] points to the substring that matches the second grouping, and so on.

The regexpDoneFlag is initially set to 0. When the search for the corresponding pattern regexpID is finished - it is set to 1.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when srcLen is less than or equal to zero.

ippStsNoOperation

Indicates a warning when pState database does not contain any patterns.

Submit feedback on this help topic

Copyright © 2000 - 2010, Intel Corporation. All rights reserved.