- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using IPP 7.0 and i got a issue with ippsRegExpReplace.
The core of the function is have written is the following while loop:
while (searched_length < src_len) {
len= src_len - searched_length;
istatus= ippsRegExpReplace_8u((const Ipp8u*)(src + searched_length),
&len, (Ipp8u*)(dst + replaced_length), &dst_len, iFind, &iNumFind,
o->ires, irers);
searched_length+= len;
replaced_length+= dst_len;
}
When I compile with pattern "g" with global flag and do a replace with the sourcestring pSrc="gggggggggggggggggggggggggg" (26 * "g") and a iNumFind= 25, i get the output:
searched_length= 26 (the whole string is searched)
replaced_length= 26
pNumFind= 25
dst="#########################g"
Shouldn't have been replaced all g's in the source string? iNumFind is 25 on input and all 25 substrings are replaced but there are 26 substrings found and the regex searches through the whole string and not stopping at the 25th match. How can i replace all substrings?
regards Chris
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page