Do Regular Expressions scare developers?
I have harped on about the joys of Regular Expressions before, and find them an indispensable tool in my developer toolkit. In fact, I never leave home without this one. What concerns me gravely is the fact that too many other developers appear to completely overlook (or ignore) regular expressions, although this lack of knowledge does produce some fine examples of user input validation code that usually has me in giggles (and defining further parameters of "Developer Culling" that is fast becoming a sport I will be partaking in).
What I would like to know is whether or not regular expressions are feared by developers? Surely in this day and age of distributed systems and complex architectures regular expressions should be part of what you know.
I have come to realise however that most developers appear to be 'writers of lines of code' rather than true developers; there's a very worrying sign of a lack of understanding of why things should be done in a particular way, and a lack of awareness of basic tools. Regular expressions are probably one of the most powerful concepts for user input validation, which also happens to be one of the most forgotten steps in code development (how many systems I come across that throw "data is too large for column" errors is also a worrying trend). Could there be a relation here?
I won't list all the samples of painfully written loops and conditions I have seen to validate a South African ID number, or the laughable routines used to determine South African Mobile Phone number validity. I will however make a statement: Learn the tools, know they exist. You do not have to be a master of them, but know they are there. There are places to find the information you need for specifics that you do not know (the internet, use it), but at least realise that these things are actually available for your use.
Remember this quote: "good code is written by good programmers". By deduction we can then say that bad code is written by bad programmers (and trust me, these particular validation routines fall well within this realm). Also remember this other quote: "You need someone who is creative enough to find innovative solutions to problems".
Regular expressions have been around for years, and all of .NET's life, deal with it.