JavaScript RegEx exec()
The JavaScript RegExp exec() method is used to get an array containing all the matched groups for a specified string. Syntax: RegExpObject.exec(string) Parameters: string: It represents the string to be searched. Return: An array containing all the matched groups for a given string. Example: <!DOCTYPE html> <html> <body> <script> var string = “HELLO WORLD”; var … Read more