Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment When to use regular expressions (Score 1) 516

I'd just like to add my two cents in here. If you are writing a quick and dirty one time script, go nuts with your regex. If your writing something that is going to be used long term, please for the sake of the maintainers just use string functions.

It is a hell of a lot easier to redo one string function than redo a complete regex when the data format changes. Also if you use string functions you can actually do real error reporting when things don't work the way you expect them to.

Slashdot Top Deals

Today is a good day for information-gathering. Read someone else's mail file.

Working...