Regular expressions are pretty tricky. You can be an expert and it can still take time to tweak. I've been using regular expressions for decades, and now find myself using GPT as a kind of pre-compiler. I'll test regular expressions with GPT and it gets really close or the final result.