Regular Expressions
Pattern Matching Options

  • There are several options you can use with / ... / which modify how a pattern is applied

      Option Stands For Description
      g Match Globally Find all occurrences (not just the first instance). Primarily used for pattern filtering operations.
      i Ignore Case Causes match for any combination of [a-z] or [A-Z] equally.
      m Multi-line Treat string as multiple lines.
      o Once Only compile pattern once.
      s Single-line Treat string as a single line.
      x Extended Enable the use of "extended" regular expressions.

  • Options can be stacked: / ... /gio