Regular Expressions JavaScript Tutorial

Pattern Matching Methods in the RegExp Object
MethodDescription
exec(str)Searches for pattern in str and returns result
test(str)Searches for pattern in str and returns true if match found, otherwise false is returned
(str)Same as exec(str) method