Escape special characters using regexp.
Reference: https://stackoverflow.com/questions/3115150/how-to-escape-regular-expression-special-characters-using-javascript
Parameters:
Name | Type | Description |
---|---|---|
text |
The text to escape |