I was trying to parse a java properties file to avoid some Properties loading pitfalls (non ordering, loss of comments).
(Property are of the form 'key = value' where the value can span on multiple lines using the \ special char)
I have tried to get the right regexp to parse the properties but after I gave up after fighting for more than one hour. (a version for groovy found here:
I manage to write the same thing using a single loop and very trivial code in 5 minutes...
I'm an average programmer when dealing with regexp: I have to re-read the doc each time I want to use them and advanced feature are still obscure for me.
Often when dealing with regexp I have the feeling that some very skilled developers can produce/decipher very elaborated regexp in seconds, but others have trouble to handle them.
Question: should I take time to deeply learn regexp and produce cryptic and powerful parser, or should I keep using some ugly easy to debug/understand parsing algo ?