From Soldat Community Wiki
Jump to: navigation, search

From the Scripting Manual

function RegExpReplace(Pattern, Source, ReplaceText: string; UseSubstitution: boolean): string;

Parameter Info:
 Pattern (String): A POSIX extended regular expression.
 Source (String): Source string to be replaced
 ReplaceText (String): If RegularExpression contains parenthesized substrings replacement may contain substrings of the form \\digit which will be replaced by the text matching the digit'th parenthesized substring; \\0 will produce the entire contents of string. Up to nine substrings may be used. Parentheses may be nested, in which case they are counted by the opening parenthesis.

 This function scans Source for matches to Pattern, then replaces the matched text with ReplaceText
 To be honest, I have no clue how regexp strings work... 
 A friend requested regexp support so here it is. 
 Google is your friend if you need help with this.



External Links