How to test and benchmark your regular expression performance

There are several free online regular expression tools available that tell you the number of steps to match a regex pattern against a given set of inputs and also provide you valuable debug info. You should also write your unit test cases. Here is a list of some online tools that can be used:

Get Java 9 Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.