Function escapeRegex

  • escape regex string

    Parameters

    • string: string
    • method: "1" | "2" = '1'

    Returns string