Escapes the RegExp special characters in string.
Useful when dynamically creating regex from user input.
Syntax
import { escapeRegExp } from "@opentf/std";
escapeRegExp(str: string)Examples
const search = "[opentf]";
const regex = new RegExp(escapeRegExp(search));
regex.test("[opentf]"); //=> true