Accuracy = 100% speed = 40WPM Duration = 47 seconds

Regular Expressions

Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec and test methods of RegExp, and with the match, replace, search, and split methods of String. This chapter describes JavaScript regular expressions.

The exec() method executes a search for a match in a specified string. Returns a result array, or null.

The test() method executes a search for a match between a regular expression and a specified string. Returns true or false.

Regular expression literals provide compilation of the regular expression when the script is loaded. If the regular expression remains constant, using this can improve performance.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions