PHP/JavaScript Question
| From: | Jeffrey Lacy | Date: | Thu, 03 Aug 2000 17:14:50 +0000 |
| Subject: | PHP/JavaScript Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9987@lists.php.net to get a copy of this message | ||
Hello. I have this JavaScript email validator, now I need it so it will
work under php. I don't think that is clear. I need someone to tell me how
to make php pass the stuff below onto the client browser thing. Here is
what I need. If you still can't understand this, email me at
jeffdl@mn.mediaone.net. Thank you!!
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
NOTE: This involves more than putting a \ in front of every ".
--
Jeff Lacy
jeffdl@mn.mediaone.net