Let's remind the famous quote from Jamie Zawinski:
"Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems."
I was neglecting this quote for a long time, until I started using regular expressions in real projects...