Turn any string into a regular expression that matches the exact string without worrying about encoding the metacharacters yourself.This function is valid in v2.0.0 to v2.16.0. This function has been downloaded 7 times.
false, it will cause just the escaped version of
strto be returned. If
true, it will be as if the empty string was passed in. A string represents the flags to be set in the returned regular expression.
truea regular expression without flags will be returned. If
flagsOrMakeRegExpis a non-empty string, a regular expression with the specified characters representing the corresponding flags will be returned. In all other cases just the escaped string that can be used as a regular expression will be returned.