> Can someone help me with validating email address chars? > > I think I have the back part ok. I just need to verify the front of the @ > sign to have atleast 4 chars, start with a-Z allows \w\-\. > > ie: [EMAIL PROTECTED] > > $email ~ /^[a-zA-Z][\w\-\.]{3,[EMAIL PROTECTED]/ >
If you know your e-mail addresses are of an exact form then ok, but otherwise do NOT try to validate email addresses with the above regex. E-mail addresses are an incredibly complex beast and just can't be done with something as simple as the above. I would suggest checking out Email::Valid for address validation, or at least pulling out the regex it contains (I believe gotten from the Mastering Regex book) and using that. Then if you want to make sure your address meets *your* standards check it specifically for those... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]