.match()
Term side of the Card
Topic: String
Unit title: .match()
Categories: Method
Explanation side of the Card
Explanation: The method that retrieves matches of a string against a regular expression. It returns an array of all matches if the regular expression has the global flag `g`. If the global flag is not present, it returns an array with only the first match or `null` if no matches are found.
Browser compatibility:
- The chrome browser supports this feature starting from version 1
- The edge browser supports this feature starting from version 12
- The firefox browser supports this feature starting from version 1
- The safari browser supports this feature starting from version 1
Availability: