Someone I know has been telling me that RegEx should be avoided, as it is heavyweight or involves heavy processing. Is this true? This made a clap in my ears, ringing my eardrums up until now.
I don’t know why he told me that. Could it have been from experience or merely 3rd-hand information (you know what I mean…)?
So, stated plainly, why should I avoid regular expressions?
Don’t avoid them. They’re an excellent tool, and when used appropriately can save you a lot of time and effort. Moreover, a good implementation used carefully should not be particularly CPU-intensive.