SBM ModScript Reference → Programming SBM ModScript → Object Types → Regex → Regex ReplaceAll() Method
Replaces matches in a compiled regex.
Parameter | Type | Description |
---|---|---|
value |
string |
Compiled regex |
replacement |
string |
Replaces |
Type | Description |
---|---|
string |
A string where all matches for the compiled Regex in "value" are replaced with "replacement". |
SBM ModScript version: 11.3.
var r = Regex(); r.Compile("\\d+"); // \d+ var changed = r.ReplaceAll("12ab3d456e78", "ABC"); Ext.WriteStream( changed );
Result:
ABCabABCdABCeABC
None.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.