RegExpReplace
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 thepSrcvector on input; its used length on output.
- pDst
- Pointer to the destination string.
- pDstLen
- Pointer to length of thepDstvector on input; its used length on output.
- pFind
- Array of pointers to the matching substrings.
- pNumFind
- Pointer to size of the arraypFindon 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
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 points to the substring that matches the whole regular expression, points to the substring that matches the first grouping, points to the substring that matches the second grouping, and so on.
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]pFind
[1]pFind
[2]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 isNULL.
- ippStsSizeErr
- Indicates an error whenpSrcLenorpDstLenis less than or equal to zero.