When you first come across regular expressions they can be totally confusing. This article from SitePoint gives a gentle introduction and some resources to go to once you’ve dipped your feet into the water.
Demystifying Regular Expressions with Practical Examples