The funny thing is that they are applicable in so many situations from Find and Replace in Visual Studio to Validating ASP.Net Form Fields to jQuery matching (though i gave up on this before i could get it to work) to parsing comma delimeted files (j/k)
Any Drawbacks? I find the major drawback is the fact that just about every regex provider uses a slightly different syntax, so you need to trawl the reference docs to find the right symbol. Heck, even Visual Studio's regex provider is slightly different to System.Text.RegularExpressions :S
To combat this there are numerous cheatsheets somewhere in the pile of papers on my desk that help to remedy this situation:
And how could I forget the obligatory quote for any blog post concerning regular expressions:
Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems. --Jamie Zawinski, in comp.lang.emacs
No comments:
Post a Comment