RegEx

RegEx (short for “regular expression”) is a type of character sequence that specifies a search pattern. It can look daunting at first, but it’s powerful in how much it can encapsulate with a concise sequence of characters. In e?xpress, it’s the driving force that lets a possibility contain multitudes.

A very short primer on RegEx:

  • a|b: The pipe | means either/or. This sequence matches a or b.
  • a?b: The question mark | means 0 or 1 of the preceding token. This sequence matches b and ab.
  • a*b: The asterisk * means 0 or more of the preceding token. This sequence matches b, ab, aab, aaab, and so on.
  • aa|(b?c): The parentheses () group tokens together to be considered in context. This sequence matches aa, c, and bc.

To learn more, try these resources: