JavaScript regular expressions methods
In the following table, you can find the methods used to match or test a regular expression. The main JavaScript objects used in regular expressions are String
and RegExp
, which represent a pattern (such as regular expression
).
Method |
Description |
Example |
---|---|---|
|
This executes a search for a match within a string, based on a regular expression. |
|
|
This executes a search for a match in its string parameter. Unlike |
|
Get JavaScript Regular Expressions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.