@snailicide/g-library
    Preparing search index...

    Function stringToRegexp

    • Converts a string to a regular expression.

      Parameters

      • value: string

        The string value to convert.

      • escape: boolean = false

        Indicates whether to escape special characters in the string. Default is false.

      • flag:
            | undefined
            | "dotAll"
            | "global"
            | "ignoreCase"
            | "multiline"
            | "sticky"
            | "unicode"
            | ("dotAll" | "global" | "ignoreCase" | "multiline" | "sticky" | "unicode")[] = 'global'

        The flag(s) to apply to the regular expression. Default is 'global'.

      Returns undefined | RegExp

      The converted regular expression or undefined if the conversion fails.