Regular Expression Functions

There are three regular-expression functions that operate on strings:

  • matches() tests if a regular expression matches a string.

  • replace() uses regular expressions to replace portions of a string.

  • tokenize() returns a sequence of strings formed by breaking a supplied input string at any separator that matches a given regular expression.