Now we've given lots of pointers for learning more about regular expressions, it's probably worth quoting Jamie Zawinski:
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
Part of learning about regular expressions is learning when not to use them (and when they're appropriate).