javascript and regularexpression?
i have a doubt t开发者_JAVA技巧hat whether javascript expression is better or regularexpression is better. i mean for validation javascript is best or ?How it is different form each other? thank you.
It depends on the kind of validation that you need.
Suppose if you need to compare two dates then regex won't be enough.
This one is a nice read
12 Reasons to Learn and Use Regular Expressions
Surya,
Javascript can help you to build some validation but you should madder what implement the same input validation on the server side.
So it's only to make it more user friendly, so you should start implementing your server input validation when you are done and if you have time add the javascript validation.
精彩评论