• Escape a given input string, prefacing special characters with backslashes for use in a regular expression

    Parameters

    • string: string

      The un-escaped input string

    Returns string

    The escaped string, suitable for use in regular expression