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: 46 regular expressions found.

Change page:   |    Displaying page 1 of 3 pages; Items 1 to 20
Title Test Details Pattern Title
Expression
^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$
Description
Person's name (first, last, or both) in any letter case. Although not perfect, this expression will filter out many incorrect name formats (especially numerics and invalid special characters).
Matches
T.F. Johnson | John O'Neil | Mary-Kate Johnson
Non-Matches
sam_johnson | Joe--Bob Jones | dfjsd0rd
Author Rating: The rating for this expression. Robert Dugre
Title Test Details Pattern Title
Expression
^(http|https|ftp)\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\-\._\?\,\'/\\\+&%\$#\=~])*$
Description
Modified URL RegExp that requires (http, https, ftp)://, A nice domain, and a decent file/folder string. Allows : after domain name, and these characters in the file/folder sring (letter, numbers, - . _ ? , ' / \ + & % $ # = ~). Blocks all other special characters-good for protecting against user input!
Matches
http://www.blah.com/~joe | ftp://ftp.blah.co.uk:2828/blah%20blah.gif | https://blah.gov/blah-blah.as
Non-Matches
www.blah.com | http://www.blah"blah.com/I have spaces! | ftp://blah_underscore/[nope]
Author Rating: The rating for this expression. Brandon Luhring
Title Test Details Pattern Title
Expression
(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,15})$
Description
I built this expression to test a string in ASP for valid username and password constraints. It can be adapted for any number of scenerios. For instance in this case, we needed to ensure the username someone wanted was not all numbers or all letters and was 6-15 characters in length with no special characters. This expression tests negatively for all number cases, then all letter cases, and lastly tests for only alphanumeric characters in the required range. In other words: the match must be alphanumeric with at least one number, one letter, and be between 6-15 character in length.
Matches
C2dfeed | sporttrak1 | 11223a
Non-Matches
pookie | d34_fff | 123456
Author Rating: The rating for this expression. Pete Lindquist
Title Test Details Pattern Title
Expression
^(?=[^\d_].*?\d)\w(\w|[!@#$%]){7,20}
Description
This regex can be used to restrict passwords to a length of 8 to 20 aplhanumeric characters and select special characters. The password also can not start with a digit, underscore or special character and must contain at least one digit.
Matches
password1 | pa$$word2 | pa!@#$%3
Non-Matches
password | 1stpassword | $password#
Author Rating: The rating for this expression. Michael Ash
Title Test Details Special Characters
Expression
^(a-z|A-Z|0-9)*[^#$%^&*()']*$
Description
Does not allow these characters in a string #$%^&*()'
Matches
Test | Whatever Text | D://folder/file.ext
Non-Matches
word's | test# | (something)
Author Rating: The rating for this expression. Vincent Faller
Title Test Details Pattern Title
Expression
^[\w0-9äÄöÖüÜß\-_]+\.[a-zA-Z0-9]{2,6}$
Description
This RegEx can be used to varify (esp. when receiving data from forms) filenames. No Path is allowed. German Special Characters are allowed.
Matches
gut.txt
Non-Matches
&quatsch | qua%tsch.txt | auch_quatsch.test.txt
Author Rating: Not yet rated. D dW
Title Test Details Pattern Title
Expression
^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$
Description
A short and sweet email address validator. Checks that the username starts and ends with an alphanumeric character, allows a few non-repeating 'special characters' (namely -, ., _, +, &) and checks for a sensible domain name (2-6 character TLD required). Some unconventional, yet technically valid, addresses will not be matched, but this is only a simple expression ;-)
Matches
Non-Matches
[email protected] | spammer@[203.12.145.68] | bla@bla
Author Rating: The rating for this expression. Luke Arms
Title Test Details Pattern Title
Expression
\w{5,255}
Description
This is User Name & Password validation expression. It does not allow blank spaces as well as special characters like $#%@&*(){}+
Matches
aa123_ter12 | aa4587 | 784566
Non-Matches
123*-/ mksj
Author Rating: The rating for this expression. Chandan Agarwal
Title Test Details Pattern Title
Expression
(?=^.{6,51}$)([A-Za-z]{1})([A-Za-z0-9!@#$%_\^\&\*\-\.\?]{5,49})$
Description
This expression was originally developed for user names. Matching text must have 6 - 50 characters, cannot contain spaces, must begin with an alpha character, can contain mixed case alpha, digits, and the following special characters: ! @ # $ % ^ & * - . _ ?
Matches
aB!@#%&^$.?*-0123456789Yz | [email protected] | Excla!Us_er
Non-Matches
1234567890 | aB1()[]{};:'",<>/\_=0Yz | !exclaUser
Author Rating: The rating for this expression. John Tobler
Title Test Details Matching urls in free text
Expression
((www|http)(\W+\S+[^).,:;?\]\} \r\n$]+))
Description
A regular expression which allows me to find strings of text floating around in free text that are in fact URLs. I need to tag these as <url>www.bmj.com/advice</url>. The problem has been allowing special characters in the url, but not mixing them up with genuine punctuation marks at the end of the url in the text-e.g. '.' or '?' or ) or ';' etc)
Matches
www.bmjpg.com/advice&search=?light+dark
Non-Matches
www.bmjpg.com/advice&search=?light+dark?
Author Rating: The rating for this expression. Sean Harrop
Title Test Details No special chart
Expression
"[A-Za-z0-9]{3}"
Description
Allow only 3 charcters or number without any special characters
Matches
QDE
Non-Matches
#RF
Author Rating: Not yet rated. Mohammed Rafiq .M
Title Test Details Pascal case
Expression
^([A-Z]{1,}[a-z]{1,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,}[A-Z]{0,}[a-z]{0,})$
Description
Matches words in PascalCase. Only alphas, no spaces or other special characters, the first character must be upper case. Matches up to 12 PascalCase words.
Matches
MyLongClassName,ABClassName
Non-Matches
my1stLong ClassName
Author Rating: Not yet rated. Rob
Title Test Details Very Strong Password
Expression
^(?=.*[a-z].*[a-z])(?=.*[A-Z].*[A-Z])(?=.*\d.*\d)(?=.*\W.*\W)[a-zA-Z0-9\S]{9,}$
Description
This pattern requires at least two lowercase letters, two uppercase letters, two digits, and two special characters. There must be a minimum of 9 characters total, and no white space characters are allowed.
Matches
A1!B2@cde
Non-Matches
ABC!@#123
Author Rating: The rating for this expression. Philip
Title Test Details Common Name
Expression
^[^\x00-\x1f\x21-\x26\x28-\x2d\x2f-\x40\x5b-\x60\x7b-\xff]+$
Description
Matches common ASCII names without special characters.
Matches
Sir. Isaac Newton | Tom O'Leary
Non-Matches
Mar!y Ann | Bob_1 | ~!@#$%^&*()_+=-0987654321`{}[]|\;:"<>?,/
Author Rating: Not yet rated. Troy Skinner
Title Test Details HTML Special Characters codes
Expression
&[a-zA-Z]+\d{0,3};
Description
This pattern matches any HTML special character code in the knowed friendly-code.
Matches
&amp;agrave; &amp;Ntilde; &amp;nbsp; &amp;frac14;
Non-Matches
&amp;#375; &amp;#x1EF3; &amp;#x17B;
Author Rating: Not yet rated. Roberto Santana
Title Test Details Validate Multiple Email Addresses
Expression
^((\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)\s*[,]{0,1}\s*)+$
Description
This will validate multiple email addresses that are comma delimited. You can change it to use commas or semilcolons. If you have to worry about a lot of special characters, you may have to edit it a little bit. It allows white space before and after the comma.
Matches
Non-Matches
test@test|[email protected],test@|test@ host.com
Author Rating: The rating for this expression. Dan Lorenz
Title Test Details Strong Password
Expression
(?=^.{8,}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s)[0-9a-zA-Z!@#$%^&*()]*$
Description
This regular expression can be used for validating a strong password. It expects at least 1 lowercase letter, 1 uppercase letter, and 1 digit. It will also allow for some special characters. The length should be greater than 8 characters. The sequence of the characters is not important.
Matches
Password1|1Passwor|passworD1|2passWord|Pass2Word|pa1SS2word|!1qAzxsw2
Non-Matches
q3w4e5er|asdfg|asdfghjkl;|ag asg ag|d36234724|mko)+OKM1
Author Rating: Not yet rated. Scot Baird
Title Test Details RFC2822 Compliant Email Address
Expression
^(?i:(?<local_part>[a-z0-9!#$%^&*{}'`+=-_|/?]+(?:\.[a-z0-9!#$%^&*{}'`+=-_|/?]+)*)@(?<labels>[a-z0-9]+\z?.*[a-z0-9-_]+)*(?<tld>\.[a-z0-9]{2,}))$
Description
RFC2822 compliant. Includes all special characters, except for allowance of quoted local-part. Also disallows '.' (period) to be at the front or end of local-part, or occurr more than once consecutively. It does allow for optional infinite number of sub-domains. The following standards are not enforced, due to RegExp limitations (unable to check for group string length): As per RFC2821 the local-part may have a maximum length of 64 characters, while the domain name may have a maximum length of 255 characters. Each domain label must be between 1 and 63 characters long, while the total length of the domain name may not exceed 255 characters.
Matches
Non-Matches
Author Rating: The rating for this expression. Mike Bronner
Title Test Details Find '&' (ampersands) that are not part of HTML Special Characters
Expression
\x26(?!((amp\x3B)|(nbsp\x3B)|(lt\x3B)|(gt\x3B)|(copy\x3B)|(reg\x3B)|(cent\x3B)|(deg\x3B)|(deg\x3B)|(micro\x3B)|(middot\x3B)|(not\x3B)|(para\x3B)|(plusmn\x3B)|(pound\x3B)|(raquo\x3B)|(sect\x3B)|(yen\x3B)|([\x23][0-9]{1,3}\x3B)|(lsquo\x3B)|(rsquo\x3B)|(sbquo\x3B)|(ldquo\x3B)|(rdquo\x3B)|(bdquo\x3B)|(dagger\x3B)|(Dagger\x3B)|(permil\x3B)|(lsaquo\x3B)|(rsaquo\x3B)|(spades\x3B)|(clubs\x3B)|(hearts\x3B)|(diams\x3B)|(oline\x3B)|(larr\x3B)|(uarr\x3B)|(rarr\x3B)|(darr\x3B)|(trade\x3B)|([\x23]x2122\x3B)|(quot\x3B)|(frasl\x3B)|(ndash\x3B)|(mdash\x3B)|(iexcl\x3B)|(cent\x3B)|(curren\x3B)|(brvbar\x3B)|(brvbar\x3B)|(uml\x3B)|(die\x3B)|(ordf\x3B)|(laquo\x3B)|(not\x3B)|(shy\x3B)|(macr\x3B)|(hibar\x3B)|(sup2\x3B)|(sup3\x3B)|(acute\x3B)|(micro\x3B)|(cedil\x3B)|(sup1\x3B)|(ordm\x3B)|(raquo\x3B)|(frac14\x3B)|(frac12\x3B)|(frac34\x3B)|(iquest\x3B)|(Agrave\x3B)|(Aacute\x3B)|(Acirc\x3B)|(Atilde\x3B)|(Auml\x3B)|(Aring\x3B)|(AElig\x3B)|(Ccedil\x3B)|(Egrave\x3B)|(Eacute\x3B)|(Ecirc\x3B)|(Euml\x3B)|(Igrave\x3B)|(Iacute\x3B)|(Icirc\x3B)|(Iuml\x3B)|(ETH\x3B)|(Ntilde\x3B)|(Ograve\x3B)|(Oacute\x3B)|(Ocirc\x3B)|(Otilde\x3B)|(Ouml\x3B)|(times\x3B)|(Oslash\x3B)|(Ugrave\x3B)|(Uacute\x3B)|(Ucirc\x3B)|(Uuml\x3B)|(Yacute\x3B)|(THORN\x3B)|(szlig\x3B)|(agrave\x3B)|(aacute\x3B)|(acirc\x3B)|(atilde\x3B)|(auml\x3B)|(aring\x3B)|(aelig\x3B)|(ccedil\x3B)|(egrave\x3B)|(eacute\x3B)|(ecirc\x3B)|(euml\x3B)|(igrave\x3B)|(iacute\x3B)|(icirc\x3B)|(iuml\x3B)|(eth\x3B)|(ntilde\x3B)|(ograve\x3B)|(oacute\x3B)|(ocirc\x3B)|(otilde\x3B)|(ouml\x3B)|(divide\x3B)|(oslash\x3B)|(ugrave\x3B)|(uacute\x3B)|(ucirc\x3B)|(uuml\x3B)|(yacute\x3B)|(thorn\x3B)|(yuml\x3B)|(Alpha\x3B)|(Alpha\x3B)|(Beta\x3B)|(beta\x3B)|(Gamma\x3B)|(gamma\x3B)|(Delta\x3B)|(delta\x3B)|(Epsilon\x3B)|(epsilon\x3B)|(Zeta\x3B)|(zeta\x3B)|(Eta\x3B)|(eta\x3B)|(Iota\x3B)|(iota\x3B)|(Kappa\x3B)|(kappa\x3B)|(Lambda\x3B)|(lambda\x3B)|(Mu\x3B)|(mu\x3B)|(Nu\x3B)|(nu\x3B)|(Xi\x3B)|(xi\x3B)|(Omicron\x3B)|(omicron\x3B)|(Pi\x3B)|(pi\x3B)|(Rho\x3B)|(rho\x3B)|(Sigma\x3B)|(sigma\x3B)|(Tau\x3B)|(tau\x3B)|(Upsilon\x3B)|(upsilon\x3B)|(Phi\x3B)|(phi\x3B)|(Chi\x3B)|(chi\x3B)|(Psi\x3B)|(psi\x3B)|(Omega\x3B)|(omega\x3B)))
Description
This expression will match ampersands('&') that are not part an HTML Special Character string.
Matches
&
Non-Matches
&amp; &psi; &#24;
Author Rating: Not yet rated. Luke Jernejcic
Title Test Details Name and Number
Expression
^\s*[a-zA-Z0-9,\s]+\s*$
Description
Will take space, number, no special characters
Matches
Project Name1, Project 1
Non-Matches
Project@1, Project Name^111
Author Rating: The rating for this expression. trupti.gore
Change page:   |    Displaying page 1 of 3 pages; Items 1 to 20

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