escapeRegExp | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function escapeRegExp

    • Encode string for use in a regexp

      Parameters

      • text: string

        Text to encode

      • Optionaloptions: { wildcards?: "?*" }

        Options for encoding

        • Optionalwildcards?: "?*"

          Type of wildcards to encode (defaults to none)

      Returns string

      Encoded for safe use in a RegExp