Glossary Term
String.prototype.match()
The match() method of String values retrieves the result of matching this string against a regular expression.
The implementation of String.prototype.match doesn’t do much other than calling the Symbol.match method of the argument with the string as the first parameter. The actual implementation comes from RegExp.prototype[Symbol.match](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/Symbol.match).
If you need to know if a string matches a regular expression RegExp, use RegExp.prototype.test(). If you only want the first match found, you might want to use RegExp.prototype.exec() instead. If you want to obtain capture groups and the global flag is set, you need to use RegExp.prototype.exec() or String.prototype.matchAll() instead.
Syntax example: match(regexp)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
