Jump to content

StringSplit Help


Recommended Posts

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
Link to comment
Share on other sites

$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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...