RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 165 regular expressions found.

Change page:   |    Displaying page 1 of 9 pages; Items 1 to 20
Title Test Details Email - Overly Simple
Expression
^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$
Description
Simple email expression. Doesn't allow numbers in the domain name and doesn't allow for top level domains that are less than 2 or more than 3 letters (which is fine until they allow more). Doesn't handle multiple "." in the domain (joe@abc.co.uk).
Matches
joe@aol.com | ssmith@aspalliance.com | a@b.cc
Non-Matches
joe@123aspx.com | joe@web.info | joe@company.co.uk
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
Description
This expression matches email addresses, and checks that they are of the proper form. It checks to ensure the top level domain is between 2 and 4 characters long, but does not check the specific domain against a list (especially since there are so many of them now).
Matches
joe@aol.com | joe@wrox.co.uk | joe@domain.info
Non-Matches
a@b | notanemail | joe@@.
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$
Description
Email validator that adheres directly to the specification for email address naming. It allows for everything from ipaddress and country-code domains, to very rare characters in the username.
Matches
asmith@mactec.com | foo12@foo.edu | bob.smith@foo.tv
Non-Matches
joe | @foo.com | a@a
Author Rating: The rating for this expression. Andy Smith
Title Test Details Pattern Title
Expression
[\w-]+@([\w-]+\.)+[\w-]+
Description
Yet another simple email validator expression.
Matches
joe@aol.com | a@b.c
Non-Matches
asdf | 1234
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$
Description
Email validation. With this short expression you can validate for proper email format. It's short and accurate.
Matches
bob-smith@foo.com | bob.smith@foo.com | bob_smith@foo.com
Non-Matches
-smith@foo.com | .smith@foo.com | smith@foo_com
Author Rating: Not yet rated. Eric Lebetsamer
Title Test Details Pattern Title
Expression
^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$
Description
Much simpler email expression. This one forces a length of 2 or 3, which fits current specs, but you may need to alter the end as this one allows all numerals on the .COM section.
Matches
a@a.com | a@a.com.au | a@a.au
Non-Matches
word | word@ | @word
Author Rating: Not yet rated. Gregory Beamer
Title Test Details Pattern Title
Expression
(\w+?@\w+?\x2E.+)
Description
Validates an email address
Matches
bob@vsnl.com
Non-Matches
[AABB]
Author Rating: Not yet rated. Prasad DV
Title Test Details Pattern Title
Expression
^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$
Description
Expression 1 of 2 used to check email address syntax.
Matches
bob@somewhere.com | bob.jones@[1.1.1.1] | bob@a.b.c.d.info
Non-Matches
bob@com | bob.jones@some.where | bob@1.1.1.123
Author Rating: Not yet rated. David Lott
Title Test Details Pattern Title
Expression
^(([-\w \.]+)|(""[-\w \.]+"") )?<([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))>$
Description
Expression 2 or 2 for matching email address syntax. This one matches the <angle bracket syntax>.
Matches
<ab@cd.ef> | bob A. jones <ab@cd.ef> | bob A. jones <ab@[1.1.1.111]>
Non-Matches
ab@cd.ef | "bob A. jones <ab@cd.ef> | bob A. jones <ab@1.1.1.111>
Author Rating: The rating for this expression. David Lott
Title Test Details Pattern Title
Expression
(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?
Description
*CORRECTED: Again thanks for all the comments below. If you want to include internal domain as well change the partial code (\.[\w-_]+)+ to (\.[\w-_]+)? See the comments below* This is the regular expression I use to add links in my email program. It also ignores those suppose-to-be commas/periods/colons at the end of the URL, like this sentence "check out http://www.yahoo.com/." (the period will be ignored) Note that it requires some modification to match ones that dont start with http.
Matches
http://regxlib.com/Default.aspx | http://electronics.cnet.com/electronics/0-6342366-8-8994967-1.html
Non-Matches
www.yahoo.com
Author Rating: The rating for this expression. M H
Title Test Details Pattern Title
Expression
<[^>]*name[\s]*=[\s]*"?[^\w_]*"?[^>]*>
Description
This RX is used to find get all named tags in an html string. If you find a problem with it, please email drew@lordstrange.com
Matches
<input type = text name = "bob"> | <select name = "fred"> | <form
Non-Matches
<input type = submit> | <font face = "arial"> | The drity brown fox stank like
Author Rating: Not yet rated. Andrew Freese
Title Test Details Pattern Title
Expression
^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$
Description
Matches e-mail addresses, including some of the newer top-level-domain extensions, such as info, museum, name, etc. Also allows for emails tied directly to IP addresses.
Matches
example@example.com | foo@bar.info | blah@127.0.0.1
Non-Matches
broken@@example.com | foo@bar.infp | blah@.nospam.biz
Author Rating: The rating for this expression. David Huyck
Title Test Details Pattern Title
Expression
^((https?|ftp)\://((\[?(\d{1,3}\.){3}\d{1,3}\]?)|(([-a-zA-Z0-9]+\.)+[a-zA-Z]{2,4}))(\:\d+)?(/[-a-zA-Z0-9._?,'+&%$#=~\\]+)*/?)$
Description
Using other regular experssions from this page, combining others for email addresses, and mixing in my own ideas - I came up with this regular expression. Can be used to validate input into a database.
Matches
http://207.68.172.254/home.ashx | ftp://ftp.netscape.com/ | https://www.brinkster.com/login.asp
Non-Matches
htp://mistake.com/ | http://www_address.com/ | ftp://www.files.com/file with spaces.txt
Author Rating: Not yet rated. Benjamin Gray
Title Test Details Pattern Title
Expression
^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$
Description
Easy expression that checks for valid email addresses.
Matches
somthing@someserver.com | firstname.lastname@mailserver.domain.com | username-something@some-server.
Non-Matches
username@someserver.domain.c | somename@server.domain-com | someone@something.se_eo
Author Rating: Not yet rated. Zrekam makerZ
Title Test Details Pattern Title
Expression
^.+@[^\.].*\.[a-z]{2,}$
Description
Most email validation regexps are outdated and ignore the fact that domain names can contain any foreign character these days, as well as the fact that anything before @ is acceptable. The only roman alphabet restriction is in the TLD, which for a long time has been more than 2 or 3 chars (.museum, .aero, .info). The only dot restriction is that . cannot be placed directly after @. This pattern captures any valid, reallife email adress.
Matches
whatever@somewhere.museum | foreignchars@myforeigncharsdomain.nu | me+mysomething@mydomain.com
Non-Matches
a@b.c | me@.my.com | a@b.comFOREIGNCHAR
Author Rating: Not yet rated. Thor Larholm
Title Test Details Pattern Title
Expression
^([1-zA-Z0-1@.\s]{1,255})$
Description
A general string validation to insure no malicious code is being passed through user input. General enough too allow email address, names, address, passwords, so on. Disallows ‘,\*&$<> or other characters that could cause issues.
Matches
email@email.com | My Name | asdf12df
Non-Matches
‘,\*&$<> | 1001' string
Author Rating: The rating for this expression. Paul Miller
Title Test Details Pattern Title
Expression
^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$
Description
Matches 99.99% of e-mail addresses (excludes IP e-mails, which are rarely used). The {2,7} at the end leaves space for top level domains as short as .ca but leaves room for new ones like .museum, etc. The ?: notation is a perl non-capturing notation, and can be removed safely for non-perl-compatible languages. See also email.
Matches
joe.tillis@unit.army.mil | jack_rabbit@slims.com | foo99@foo.co.uk
Non-Matches
find_the_mistake.@foo.org | .prefix.@some.net
Author Rating: Not yet rated. J. Washam
Title Test Details Pattern Title
Expression
^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$
Description
Matches a valid email address including ip's which are rarely used. Allows for a-z0-9_.- in the username, but not ending in a full stop i.e user.@domain.com is invalid and a-z0-9- as the optional sub domain(s) with domain name and a 2-7 char (a-z) tld allowing for short tld's like ca and new ones like museum.
Matches
username@domain.com | u-s_e.r1@s-ub2.domain-name.museum:8080 | user_name@123.123.123.12
Non-Matches
user@domain | user@domain.c | user.@domain.com
Author Rating: Not yet rated. nick bennett
Title Test Details Pattern Title
Expression
^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$
Description
It verifies that: - Only letters, numbers and email acceptable symbols (+, _, -, .) are allowed - No two different symbols may follow each other - Cannot begin with a symbol - Ending domain must be at least 2 letters - Supports subdomains - TLD must be between 2 and 6 letters (Ex: .ca, .museum) - Only (-) and (.) symbols are allowed in domain, but not consecutively. Problems: See comments below
Matches
g_s+gav@com.com | gav@gav.com | jim@jim.c.dc.ca
Non-Matches
gs_.gs@com.com | gav@gav.c | jim@--c.ca
Author Rating: The rating for this expression. Gavin Sharp
Title Test Details Pattern Title
Expression
^([a-zA-Z.\s']{1,50})$
Description
This is just a regular special char expression used to get the hax0rs off your back (hopefully). You can use this for regular open name checking if you wanted. It only fails on the insert of anything other than a-z, A-Z, and ' or whitespace. I'm open to suggestions, but try to email them to me as well as posting them to help others. Thanks.
Matches
Jon M. Doe | Tim L. O'Doul | ...'''''
Non-Matches
Doe, Jon | <>,;:"?/ | %\$#@!
Author Rating: Not yet rated. John Smart
Change page:   |    Displaying page 1 of 9 pages; Items 1 to 20

Copyright © 2001-2014, RegexAdvice.com | ASP.NET Tutorials