DuAEF.DuJS.RegExp

JavaScript Regular Expression related methods

Members

static, readonly javascriptSymbols

The set containing javascript symbols ( +, -, [, etc.). Useful when parsing javascript code.

static, readonly javascriptVarChars

The set containing authorized characters for javascript variable. Useful when parsing javascript code.

Methods

static escapeRegExp(string) → {string}

Escape reg exp reserved characters from a string to build a regular expression compatible string
Parameters:
Name Type Description
string string The string to escape
Returns:
string - The escaped string