in reply to regular expression questions (from someone without experience)
What I generally try to do is to subdivide the problem into four concerns:
This is the general approach taken by Perl’s little-brother, awk. (Still a very good tool...)
There really isn’t much more to be said, I’m afraid. Regular expressions are a black art. However, there are a great many “Perl-compatible regular expression checker” web sites to help you with debugging.