Mastering Regex or regular expressions is not an easy task. It takes a lot of trial and error initially until you get a hang of it. However until one can achieve mastery over regex or regular expressions there are a number of online testers that can help you test your regular expressions. The list below provides some of the best online regex testers that you can use to test out your regex code.
RegExr Regex tester
RegExr is the most elegant Regex tester available online for free. RegExr has separate windows and sections for showing the expression, the matched text and the regex code. It highlights the expression in a different color if there is a match. RegExr has a separate window for different command options that can be used with regular expressions. You need to just pick and choose the right option in your command. This regex tester also has many samples if you need to look at them to understand how to use regular expressions in a test.
Regexpal Regex tester
Regexpal is next best free option to test regular expressions. Regpal also highlights the matched text while typing regex command / pattern. It however does not provide any regex samples to test. It does have a useful quick reference to helpyou create regex patterns. Also supports inverted matches (match any text not matched by the regex).
Regexplanet Regex tester
Regexplanet is the next best and free option as regex tester. This tool allows you to have multiple test strings. You can have as much as five inputs to test simultaneously. Various regex command options are conveniently provided as check box options. It allows you to test Regular expressions in Java, PHP, Ruby, .Net and python. There is also a page to see what others are testing. You may sometime find what you are looking for here.
If you have other better options please share.