Need your help to explain in detail the new BUILD IN FUNCTION matches ()
Hi
Very pleased to see that ZC have added the new builder in functions matches (), add the following code to explain one by one:
- phone = "(123) 456 7890";
- if(phone.matches("^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$") == false) (?)
- {
- Info "Please enter a valid Phone format"; (it's understood)
- }
Mainly above the regular expression is explained in detail。
Thanks
Stanley Guo
2011-10-25