This is my personal blog. The views expressed on these pages are mine alone and not those of my employer.

Monday, 23 November 2009

Regular Expressions are fun

I've finally made the effort to fully understand how to write my own regular expressions.  In the past I just had no idea what something as cryptic as ^.+[a-zA-Z][a-zA-Z]\d\d\d\d\d\d.+?.pdf|^.+\w+\.xml (I just wrote that) meant.

Plugging that into my application now means that it fully validates my input, and does it perfectly.  How did we manage before these things were invented?

If you want to learn more about regular expressions then take a look here.

No comments:

Post a Comment