Module ringo/utils/regexp

Functions


escape (str)

Accepts a string; returns the string with regex metacharacters escaped. the returned string can safely be used within a regex to match a literal string. escaped characters are [, ], {, }, (, ), -, *, +, ?, ., , ^, $, |, #, [comma], and whitespace.

Parameters

String str the string to escape

Returns

String the escaped string