reEscape

Escapes regular expression control characters within a string.

reEscape(string); → returns string

Argument Reference

string string
Required

The string you that to escape.

Examples
Sample code invoking the reEscape function

reEscape('*.{}[]exam?ple')

Expected Result: \*\.\{\}\[\]exam\?ple


Fork me on GitHub