Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

RegExpReplace

DEPRECATED. Performs find and replace operation.

Syntax

IppStatus ippsRegExpReplace_8u(const Ipp8u* pSrc, int* pSrcLenOffset, Ipp8u* pDst, int* pDstLen, IppRegExpFind* pFind, int* pNumFind, IppRegExpState* pRegExpState, IppRegExpReplaceState* pReplaceState);

Include Files

ippch.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc

Pointer to the source string.

pSrcLenOffset

Pointer to length of the pSrc vector on input; its used length on output.

pDst

Pointer to the destination string.

pDstLen

Pointer to length of the pDst vector on input; its used length on output.

pFind

Array of pointers to the matching substrings.

pNumFind

Pointer to size of the array pFind on input, to number of matching substrings on output.

pRegExpState

Pointer to the compiled pattern structure.

pReplaceState

Pointer to the state structure for the find and replace operation.

Description

NOTE:
This function is deprecated and will be removed in a future release. If you have concerns, open a ticket and provide feedback at https://supporttickets.intel.com/.

This function search through the pSrcLen elements of the source string pSrc for substrings that match the specified regular expression in accordance with the regular expression pattern that is stored in the structure pRegExpState. This state structure must be initialized by the ippsRegExpInit function beforehand. All found matches are replaced according to the replacement pattern that is stored in the structure pReplaceState. This structure must be initialized beforehand by the function ippsRegExpReplaceInit.

Initially the parameter pNumFind specifies the size of array pFind, the output parameter pNumFind returns the number of the matching substrings. pFind->pFind specifies the offset of the pointer to the matching substring, and pFind->lenFind - number of elements in the matching substring. pFind [0] points to the substring that matches 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.

NOTE:

The compiled regular expression pattern and/or replacement pattern can be used for different input strings in different combinations.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

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