dimanche 18 février 2018

If any substring in a string contains the required regex

mailto:abcd@gmail.com wont match the email regex. /\A[\w+-.]+@[a-z\d-]+(.[a-z\d-]+)*.[a-z]+\z/i I want to check if any substring in the given string matches the regex. In this case, abcd@gmail.com matches the regex.

Aucun commentaire:

Enregistrer un commentaire