Why are people using regexp for email and other complex validation?

后端 未结 12 1345
感情败类
感情败类 2020-12-16 16:01

There are a number of email regexp questions popping up here, and I\'m honestly baffled why people are using these insanely obtuse matching expressions rather than a very si

12条回答
  •  悲&欢浪女
    2020-12-16 16:38

    Regexps are much faster to use, of course, and they only validate what's specified in the RFC. Write a custom parser? What? It takes 10 seconds to use a regexp.

提交回复
热议问题