Funky Syntax for validation
Posted: Mon Mar 01, 2004 5:12 pm
I see this all over the place, and by doing some HW, I can understand some of it, but could someone elaborate to get a clearer view?
I know it is
Numbers 0-9, only 5, a dash, numbers 0-9 again, only 4
But the end syntax and the format of the () is quirkin me.
_S
Code: Select all
/^[0-9]{5}([-]?[0-9]{4})?$/Numbers 0-9, only 5, a dash, numbers 0-9 again, only 4
But the end syntax and the format of the () is quirkin me.
_S