JavaScript String match() method
The JavaScript string match() method determines a specified regular expression in a given string and returns that regular expression if a match occurs. Note: To get all the matches we have to use a global modifier. Syntax: string.match(regexp) Parameters: regexp: It represents the regular expression to be searched. Return: Matched regular expression. Example: <!DOCTYPE html> … Read more