The Other Methods

Familiarize yourself with the test method and learn how to override the RegExp class to provide custom behavior.

We'll cover the following...

The exec method is potentially the only method you will care about 90% of the time when dealing with this object. However, there are other methods that might come in handy when trying to do some advanced operations with regular expressions.

The test method

The test method is similar to the previous one, but it only returns true or false depending on whether there are any matches or not. The other methods available from this object are actually internally used by other objects, such as String, to ...