• escape regex string

    Returns

    Parameters

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

    Returns undefined | string