replaceAll
replaceAll(text: String; replacement: String): String;
The replaceAll method of the JadeRegexPattern class replaces all occurrences of the pattern in the specified text with the replacement text.
The following is an example of a replaceAll operation with a customized pattern.
vars regexPattern : JadeRegexPattern; text, actual, replacement, resultStr, patternStr : String; begin text := "dog cat, dog cat, alone in the world is the little dog cat!"; create regexPattern; regexPattern.compile("(dog)\s*(?'feline'cat)"); write regexPattern.replaceAll(text, "$feline $1"); // writes "cat dog, cat dog, alone in the world is the little cat dog!" end;
This method returns the replacement string; or it returns null ("") if there is no successful match.
2020.0.01 and higher