JavaScript RegEx test() method
The JavaScript RegExp test() method is used to search for a match between a regular expression and a specified string. Syntax: RegExpObject.test(string); Parameters: string: It represents the string to be searched. Return: It returns true if the match between a regular expression and a specified string is found otherwise returns false. Example: <!DOCTYPE html> <html> … Read more