Skip to content

function_escapeForRegex

Wesley de Groot edited this page Jul 31, 2018 · 4 revisions
                     _    _____ 
                    | |  / ____|
                    | |  | (___ 
                _   | |  \___  \
 ______    _   | |__| |  ____) |
|______|  (_)   \____/  |______/
                    v1.0.0 Final

Function escapeForRegex

_.escapeForRegex(str)



Escape a string for safe regex use!


🌍 Universal function

This function is for the Command Line Interface and Websites!


Parameter list

Type @var Description Required
object [object] Wrapper Optional
string str the string to escape Required

Example:

_.escapeForRegex('myPotensialRegexUnSafeString')


Returns:

string




Back to function list
Clone this wiki locally