You might want to pick up a used copy of this book, if only as an occasional resource: https://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124 -r