Skip to main content
Latest
function escapeRegExp
import { escapeRegExp } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

Escapes the RegExp special characters "^", "$", "", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in string.

Examples

_.escapeRegExp('lodash'); // => '[lodash](https://lodash.com/)'