I really liked Mastering Regular Expressions by Jeffrey Friedl. He goes in depth on what they are (with a bit of FSA background) and how a regex engine works. It helps conceptualize what's going on and how to know what your specific regex library is doing.<p>Does that matter all that much? Not necessarily, but it's good to know things like whether or not your regex can blow in time complexity due to back tracking or not.<p>Other than that, there's a syntax overview that's very strong, and the rest is pretty straight forward from there - just applying sequential pieces one after the other to build your pattern.<p>I also like those regex crosswords - those are some of my favorite puzzles to do. I wish there were more of them! <a href="https://regexcrossword.com/" rel="nofollow">https://regexcrossword.com/</a>
A cheatsheet, stackoverflow and <a href="https://regex101.com/" rel="nofollow">https://regex101.com/</a> - and of course a basic understanding of regular expressions in general.<p>If something gets too complex, I tend to write a Tokenizer / Lexer these days. It's not that hard.
I used to spend a lot of time writing these by hand with reference pages and such. But these days ChatGpt is so good at coming up with them (and/or debugging them) I just use that instead. It's basically just another language it can easily translate to and from.