Options
All
  • Public
  • Public/Protected
  • All
Menu

Module regexFilter

Index

Functions

Functions

regexFilter

  • regexFilter(regexString: string): Option<RegExp>
  • 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 Option<RegExp>

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

Generated using TypeDoc