RegExp

A regular expression is a pattern of characters.

The pattern is used for searching and replacing characters in strings.

The RegExp Object is a regular expression with added Properties and Methods.


/pattern/modifier(s);


Example explained:

  • regexp - The pattern to search for
  • /regexp/ - A regular expression
  • /regexp/i - A case-insensitive regular expression