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?

0 comments:

Post a Comment