regex_quote()
Learn how to use the regex_quote() function to return a string that escapes all regular expression characters.
Returns a string that escapes all regular expression characters.
Syntax
regex_quote(
string)
Parameters
Name | Type | Required | Description |
---|---|---|---|
string | string | ✔️ | The string to escape. |
Returns
Returns string where all regex expression characters are escaped.
Example
print result = regex_quote('(so$me.Te^xt)')
Output
result |
---|
\(so\$me\.Te\^xt\) |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.