Next to the Jeffrey Friedl's authoritative book Mastering Regular Expressions, the most useful tool that I've found while working on regular expression is the website regex101.com.

The explanation, match info and reference are all invaluable tools, available right there.