It is clear that there are lots of problems that look like a simple regex expression will solve, but which prove to be very hard to solve with regex.
<
You should always learn regular expressions - only this way you can judge when to use them. Normally they get problematic, when you need very good performance. But often it is a lot easier to use a regex than to write a big switch statement.
Have a look at this question - which shows you the elegance of a regex in contrast to the similar if() construct ...