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

Change page:   |    Displaying page 389 of 404 pages; Items 7761 to 7780
Title Test Details URL w/ Port Option
Expression
^(\w{3,6}\:\/\/[\w\-]+(?:\.[\w\-]+)+(?:\:\d{2,4})*(?:\/?|(?:\/[\w\-]+)*)(?:\/?|\/\w+\.\w{2,4}(?:\?[\w]+\=[\w\-]+)?)?(?:\&[\w]+\=[\w\-]+)*)$
Description
Here's my relaxed version of an URL regex. This one accepts just about anything but a double dot but still must resemble an URL to pass. Unlike my other URL validater this one accepts a port. Doesn't accept out of place meta characters.
Matches
http://domain.com/ | ftp://foo.bar/dir | https://me.us/file.pl?arg=1
Non-Matches
http://domain | ftp://foo.bar//dir | https://me.us/file..pl
Author Rating: The rating for this expression. tedcambron
Title Test Details Embedded YouTube Video
Expression
(\"http:\/\/www\.youtube\.com\/v\/\w{11}\&rel\=1\")
Description
A simple regex to validate an embedded YouTube video.
Matches
a valid embedded YouTube video
Non-Matches
anything else
Author Rating: The rating for this expression. tedcambron
Title Test Details Embedded Google Video
Expression
(\"http:\/\/video\.google\.com\/googleplayer\.swf\?docId=\d{19}\&hl=[a-z]{2}\")
Description
A simple regex for validating an embedded Google video.
Matches
an embedded Google video
Non-Matches
anything else
Author Rating: The rating for this expression. tedcambron
Title Test Details Punctuation
Expression
^((\'|\")?[a-zA-Z]+(?:\-[a-zA-Z]+)?(?:s\'|\'[a-zA-Z]{1,2})?(?:(?:(?:\,|\.|\!|\?)?(?:\2)?)|(?:(?:\2)?(?:\,|\.|\!|\?)?))(?: (\'|\")?[a-zA-Z]+(?:\-[a-zA-Z]+)?(?:s\'|\'[a-zA-Z]{1,2})?(?:(?:(?:\,|\.|\!|\?)?(?:\2|\3)?)|(?:(?:\2|\3)?(?:\,|\.|\!|\?)?)))*)$
Description
This is a little goofy regex to allow punctuation. I was reluctant to post it but what the heck. If it puts a smile on somebody's face then it was worth it. It works in most cases. :)
Matches
"hello!" | "hello again"! | I'm back
Non-Matches
hello" | "hello again!"! | I'mnot back
Author Rating: The rating for this expression. tedcambron
Title Test Details Person's Name
Expression
^([a-zA-Z]+(?:\.)?(?:(?:'| )[a-zA-Z]+(?:\.)?)*)$
Description
Here's a regex for a person's name. Simple but effective.
Matches
Mr. O'Donnell III | Billy B. Bob Jr.
Non-Matches
@$%&? | 0'Donnell
Author Rating: The rating for this expression. tedcambron
Title Test Details Subject or Title w/ Punctuation
Expression
^([^_][\w\d\@\-]+(?:s\'|\'[a-zA-Z]{1,2})?(?:\,)?(?: [\w\d\@\-]+(?:s\'|\'[a-zA-Z]{1,2})?(?:\,)?)*(?:\.|\!|\?){0,3}[^\s_])$
Description
Here's a regex for a title or subject line. The title (or subject) may contain basic punctuation and may not have leading or trailing spaces or underscores but that's about it.
Matches
Wow, what a day! | 100th Aniversary | This Works...
Non-Matches
!Wow,what a night | _begin_ | This ,wont work' either....
Author Rating: Not yet rated. tedcambron
Title Test Details Numbers
Expression
^((?:\+|\-|\$)?(?:\d+|\d{1,3}(?:\,\d{3})*)(?:\.\d+)?(?:[a-zA-Z]{2}|\%)?)$
Description
Here's another one for numbers. Any kind of number. Money $$$, percentage %, ect. Commas are optional and must be properly formatted.
Matches
$1,000,000.00 | 100% | 12345.67890
Non-Matches
$$10.00 | 10%% | 1234,5678, | 123.456.789
Author Rating: The rating for this expression. tedcambron
Title Test Details Domain URL
Expression
^(http\:\/\/(?:www\.)?[a-zA-Z0-9]+(?:(?:\-|_)[a-zA-Z0-9]+)*(?:\.[a-zA-Z0-9]+(?:(?:\-|_)[a-zA-Z0-9]+)*)*\.[a-zA-Z]{2,7}(?:\/)?)$
Description
A URL to a domain name. Only for HTTP but that can be easily changed to accept more. The dashes and underscores can only be used between text and/or digits. The slash on the end is optional. Unlike my other URL checkers this one does not allow query strings.
Matches
http://www.website.com/ | http://my-website.net | http://another_site.org
Non-Matches
www.website.com | http://_website.com | http://www. web--site.com
Author Rating: The rating for this expression. tedcambron
Title Test Details Password
Expression
^([a-zA-Z0-9]{6,18}?)$
Description
My simple but effective password regex. The password can only contain letters and/or digits and must be at least 6 characters long and no more than 20. I know it says {6,18} but it just works out that way. The question mark was added for optimization. Also, the password can not begin or end with a space or underscore.
Matches
abc123
Non-Matches
_abc123_
Author Rating: The rating for this expression. tedcambron
Title Test Details Absolute Path
Expression
^((?:\/[a-zA-Z0-9]+(?:_[a-zA-Z0-9]+)*(?:\-[a-zA-Z0-9]+)*)+)$
Description
An overly simple UNIX based path regex. The path must begin with a forward slash. The path segments may not lead or end with an underscore or dash which is a good thing. They also can not be doubled (__ or --). Another good thing. I've omitted all the punctuation that RFC allows until further notice.
Matches
/users/web/mysite/web/cgi-bin
Non-Matches
/users/web/my site/web/cgi-bin | users/web/mysite/web/cgi-bin/
Author Rating: The rating for this expression. tedcambron
Title Test Details Basic Subject or Title
Expression
^([a-zA-Z0-9]+(?: [a-zA-Z0-9]+)*)$
Description
This is a very basic regex for a simple subject or title. It must begin and end with a word character and may contain spaces. No punctuation :(
Matches
My Category
Non-Matches
any nonword character and leading/trailing spaces
Author Rating: The rating for this expression. tedcambron
Title Test Details Class A Network Number
Expression
^(10\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5]\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5]\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5])$
Description
The IANA resrved 24-bit block of IP address space for private internets. It's just a single class A network number. This is also RFC 1918 compliant.
Matches
10.0.0.0 | 10.255.255.255
Non-Matches
17.16.0.0 | 192.168.255.255
Author Rating: Not yet rated. tedcambron
Title Test Details Class B Network Numbers
Expression
^(172\.1[6-9]|2[0-9]|3[0-1|\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5]\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5])$
Description
This is a set of 16 contiguous class B network numbers or a 16-bit block of ip address space as reserved by the IANA. RFC 1918 compliant.
Matches
172.16.0.0 | 172.31.255.255
Non-Matches
10.0.0.0 | 10.255.255.255 | 192.168.0.0 | 192.168.255.255
Author Rating: Not yet rated. tedcambron
Title Test Details Class C Network Numbers
Expression
^(192\.168\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5]\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5])$
Description
This is the 16-bit block of the IP address space for private internets reserved by the IANA. A set of 256 contiguous class C network numbers per RFC 1918.
Matches
192.168.0.0 | 192.168.255.255
Non-Matches
10.0.0.0 | 172.31.255.255
Author Rating: Not yet rated. tedcambron
Title Test Details RFC Compliant Path
Expression
^(/(?:(?:(?:(?:[a-zA-Z0-9\\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*)(?:/(?:(?:(?:[a-zA-Z0-9\\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*)(?:;(?:(?:[a-zA-Z0-9\\-_.!~*'():\@&=+\$,]+|(?:%[a-fA-F0-9][a-fA-F0-9]))*))*))*))$
Description
After reading RFC2396 and researching it a little more I put together this regex to use for verifying a path rather than my non-compliant, safer, overly simple one. More specifically an absolute path.
Matches
All RFC2396 compliant paths
Non-Matches
A non-RFC2396 compliant path
Author Rating: Not yet rated. tedcambron
Title Test Details US Phone Number
Expression
^(1?(?: |\-|\.)?(?:\(\d{3}\)|\d{3})(?: |\-|\.)?\d{3}(?: |\-|\.)?\d{4})$
Description
This is my simple phone number regex. There are many like it but this is mine. It accepts the most common United States phone number formats that normal people use. The number 1 at the beginning is optional and so is the separators. The separators can be a dash (-), a period (.) or a space. Putting the area code in parenthesis is also an option. That's about it.
Matches
1-234-567-8910 | (123) 456-7891 | 123.456.7891 | 12345678910
Non-Matches
12-345-678-9101 | 123-45678 | 123456789101
Author Rating: The rating for this expression. tedcambron
Title Test Details US Zip Code
Expression
^(\d{5}(?:\-\d{4})?)$
Description
Just for US zip codes. Very simple but effective regex for verifying a number that resembles a zip code. The post office number is optional.
Matches
12345 | 12345-6789
Non-Matches
1234 | 123456 | 12345-123 | 12345-12345
Author Rating: The rating for this expression. tedcambron
Title Test Details Social Security Number
Expression
^(?!000)(?!666)(?!9)\d{3}([- ]?)(?!00)\d{2}\1(?!0000)\d{4}$
Description
Updated SSN regex. A very simple one for verifying a properly formatted US social security number. First three digits must be 001 - 899 and not 666. Disallows all zeros in a group.
Matches
123-45-6789
Non-Matches
123-45 6789 | 1234-56-7890 | 123-00-7890
Author Rating: The rating for this expression. tedcambron
Title Test Details Date
Expression
^(\d{4}(?:(?:(?:\-)?(?:00[1-9]|0[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-6]))?|(?:(?:\-)?(?:1[0-2]|0[1-9]))?|(?:(?:\-)?(?:1[0-2]|0[1-9])(?:\-)?(?:0[1-9]|[12][0-9]|3[01]))?|(?:(?:\-)?W(?:0[1-9]|[1-4][0-9]5[0-3]))?|(?:(?:\-)?W(?:0[1-9]|[1-4][0-9]5[0-3])(?:\-)?[1-7])?)?)$
Description
This is a regular expression to check for a properly formatted date according to the international date and time notation ISO 8601. Remember, this is just for the date. See ISO 8601 specification for more information.
Matches
ISO 8601 date format
Non-Matches
non-ISO date format
Author Rating: The rating for this expression. tedcambron
Title Test Details Time
Expression
^([0-2][0-4](?:(?:(?::)?[0-5][0-9])?|(?:(?::)?[0-5][0-9](?::)?[0-5][0-9](?:\.[0-9]+)?)?)?)$
Description
This is a regular expression to check for a properly formatted time according to the international date and time notation ISO 8601. See ISO 8601 specification for more information.
Matches
24 | 24:00 | 23:59:59 | 235959
Non-Matches
25 | 24:60
Author Rating: The rating for this expression. tedcambron
Change page:   |    Displaying page 389 of 404 pages; Items 7761 to 7780

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