str = StrReplaceRegex(sFull,sFind,sReplace,bAll,bIgnoreCase)
This macro function takes a string sFull and replaces occurrences of the string sFind by sReplace using regular expressions.
•bAll: when this parameter is true, all occurrences of sFind will be replaced, otherwise only the first occurrence will be replaced.
•bIgnoreCase: when this parameter is true the search for occurrences of sFind is case insensitive.
// remove duplicates with symbols such as 22†^§ø,22*†^
sRegex = '([0-9]{1,2}[*†^§ø]{0,5}), \1(?=[^0-9])'
sCurString = StrReplaceRegex(sResult,sRegex,'\1',true,true)
See also: StrReplace, StrFindRegex, PadString.
Topic 188580, last updated on 23-Jun-2025