• Escape a regular expression string.

    Parameters

    • regex: RegExp

      Regular expression to escape.

    Returns string