What is the purpose of the exec() method in RegExp?
Searches a string for a pattern and returns its index
Returns a boolean indicating if a match is found
Splits a string into an array based on a pattern
Returns an array of match details or null if no match is found
This question is part of this quiz :
Regular Expressions