Sign in to follow this  
Followers 0
ReaImDown

StringSplit Help

7 posts in this topic

I was wondering how I would check a user input and verify that is is a PROPER Email. IE,

VALID Emails

XXXX@XXXX.XXX

INVALID Emails

XXXX@XXXXXXX

XXXXXXXX.XXX

XXXXXXXXXXX

Randy S.


[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Description: This pattern allows standard e-mail addresses (e.g. user@domain.com), sub domains (e.g. user@foo.domain.com), the new two- and four-letter domains (e.g. user@domain.tv and user@domain.name) and country codes (e.g. user@foo.com.us). Also, this patter follows the Network Solutions standard length of 67 characters for top-level domains. The reason I allow numbers to be entered in the domain suffix is for future planning. If you do not want numbers to be able to be added as a domain suffix (e.g. user@domain.123), simply delete the last two occurrences of "\d". Matches: foo@foo.com|||foo@foo-foo.com.au|||foo@foo.foo.info Non-Matches: foo@.com|||foo@foo..com|||foo@me@.com Author: Laurence O'Donnell

$email = "billgates@microsoft.com"
$result = StringRegExp($email,"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$", 0)
MsgBox(0,"",$result)

Taken from:

http://regexlib.com/DisplayPatterns.aspx

Edited by weaponx

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You could use StringRegExp() to verify Syntax, but when it comes to actual domain validity, maybe you could search for verifiers online

Edited by Paulie

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$email = "billgates@microsoft.com"
$result = StringRegExp($email,"^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?){:content:}quot;, 0)
MsgBox(0,"",$result)

Taken from:

http://regexlib.com/DisplayPatterns.aspx

hmmm, I tried it, and I got an error...

"Error: Unterminated string."

hmmm, its missing a " somewhere

Edited by ReaImDown

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites

Fixed, try it now.

Share this post


Link to post
Share on other sites

Fixed, try it now.

so, it will only return 1 or 0? 1 = good email, 0 = bad, :) cool, thank you ^_^


[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites

so, it will only return 1 or 0? 1 = good email, 0 = bad, :) cool, thank you ^_^

1 = Valid

0 = Invalid

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0