string.replaceRegex()
Replace occurrences of a String matching a regex.
Signature
replaceRegex(match: String, replacement: String) => String
replaceRegex(match: String, replacement: String, count: Number) => String
Description
The replaceRegex()
method replaces count number of occurrences of
the a string that evaluates to the match regex with the replacement
string.
The original string isn’t changed.
Return value
Type | Description |
---|---|
Original string with substrings that match the match regex replaced by the replacement string. |
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!