stream-charts
    Preparing search index...
    • Wraps the creation of the regex in a try/catch and returns the regex, wrapped in an option, when it is valid. This can be used, for example, in a text field where the user types a regex.

      Parameters

      • regexString: string

        The string representation of the regex

      Returns Result<RegExp, string>

      The regular expression (RegExp) wrapped in an option. If the regexp is invalid, then the option is none.