JavaScript Regular Expressions
A regular expression is a sequence of characters that forms a search pattern. Regular expressions can be used to search for patterns in strings.
JavaScript Regular Expression Syntax
The syntax for a JavaScript regular expression is as follows:
/pattern/modifiers
The pattern is the search pattern. The modifiers are optional modifiers that affect the way the pattern is matched.