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

Change page:   |    Displaying page 9 of 11 pages; Items 161 to 180
Title Test Details URL Validation
Expression
(http|ftp|https)://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,4}(/\S*)?$
Description
This Regex check protocol (ftp, http, https), extension should be between 2 and 4 chars example (.co.uk, .com, .us and .info), domain or subdomain name between protocol and extension should contain the following chars a-z, A-Z, 0-9, "-", and "." The rest of URL after "/" contain unicode char
Matches
http://domain-1.us | ftp://www.domain.co.uk | https://domain.info | https://subdomain.domain.info | http://subdomain.domain.info/الجزائر.html
Non-Matches
http://domain.infor | http://domain_1.com
Author Rating: Not yet rated. Mahdi Kamel
Title Test Details Accept a url
Expression
/^(www\.|http:\/\/|https:\/\/|http:\/\/www\.|https:\/\/www\.)[a-z0-9]+\.[a-z]{2,4}$/
Description
accept pages that start with www, http or https and ends with a word between 2 and 4 letters
Matches
www.google.com, http://google.com, https://google.com, http://www.google.com, www.google.tk
Non-Matches
google.com
Author Rating: Not yet rated. Jorge
Title Test Details Accept a url
Expression
/^(www\.|http:\/\/|https:\/\/|http:\/\/www\.|https:\/\/www\.)[a-z0-9]+\.[a-z]{2,4}$/
Description
accept pages that start with www, http or https and ends with a word between 2 and 4 letters
Matches
www.google.com, http://google.com, https://google.com, http://www.google.com, www.google.tk
Non-Matches
google.com
Author Rating: Not yet rated. Jorge
Title Test Details Accept a url
Expression
/^(www\.|http:\/\/|https:\/\/|http:\/\/www\.|https:\/\/www\.)[a-z0-9]+\.[a-z]{2,4}$/
Description
accept pages that start with www, http or https and ends with a word between 2 and 4 letters
Matches
www.google.com, http://google.com, https://google.com, http://www.google.com, www.google.tk
Non-Matches
google.com
Author Rating: Not yet rated. Jorge
Title Test Details Optional Querystring
Expression
(?:\?=.*)?$
Description
Add this on to the end of your url rewriting regex to allow an optional querystring to be appended to whatever you are matching. Useful for example when you set up a Google PPC campaign and all of your urls break. Note: doesn't handle #fragments.
Matches
?with=querystring | | ?with=multiple&query=strings
Non-Matches
?with=querystring#fragment
Author Rating: Not yet rated. Matthew Harris
Title Test Details Match Default Document + Optional Querystring
Expression
^~/(?:default\.aspx)?(?:\?=.*)?$
Description
Designed for asp.net default document matching. It allows either a plain url (~/) or a default document url (~/default.aspx) both with an optional querystring. Cassini and IIS7 handle default document matching differently. The user could type it either way. The breadcrumb / sitemap system is funny about omitting default.aspx. Note: Doesn't handle #fragements
Matches
/default.aspx | /default.aspx?query=string | / | /?query=string
Non-Matches
/default.aspx#fragment | /default.aspx?query=string#fragment | /#fragment | /?query=string#fragment
Author Rating: Not yet rated. Matthew Harris
Title Test Details URL Validator
Expression
^(?:http|https):\/\/[\w.\-]+(?:\.[\w\-]+)+[\w\-.,@?^=%&:;/~\\+#]+$
Description
Broad URL Validator
Matches
http://calendar.creighton.edu/ http://woork.blogspot.com/2009/01/elegant-animated-weekly-timeline-for.html http://flesler.blogspot.com/
Non-Matches
http://.com/
Author Rating: Not yet rated. Damien Dates
Title Test Details Regular Expression to Extract Standard Domain Name
Expression
(http[s]?://)?([A-Za-z0-9-]\.)*(?<domainName>([A-Za-z0-9-]+\.)[A-Za-z]{2,3})/?.$
Description
This regular expression is designed just to extract the domain name from a URL. A domain name may neither start with nor end with a dash. I didn't take the time to add in this check and am actually not sure that it could be easily done. Try it for yourself to understand why.
Matches
http://happycatfish.com/|http://happycatfish.com/our-work
Non-Matches
http://happycatfish.comm|http://happycatfish.c
Author Rating: The rating for this expression. Anthony Gatlin
Title Test Details new era hats
Expression
new era hats
Description
[url=http://www.hats-world.com]New Era Hats[/url] [url=http://www.wholesale-cheap-newera-hats.com]New Era Hats[/url]
Matches
http://www.hats-world.com
Non-Matches
http://www.wholesale-cheap-newera-hats.com
Author Rating: Not yet rated. kokuo
Title Test Details Youtube video id from url
Expression
^(http(s?):\/\/)?(www\.)?youtu(be)?\.([a-z])+\/(watch(.*?)(\?|\&)v=)?(.*?)(&(.)*)?$
Description
also matches youtu.be/video_id, the video id is at $9
Matches
http://www.youtube.com/watch?v=lK-zaWCp-co&feature=g-all-u&context=G27a8a4aFAAAAAAAAAAA | http://youtu.be/AXaoi6dz59A | youtube.com/watch?gl=NL&hl=nl&feature=g-vrec&context=G2584313RVAAAAAAAABA&v=35LqQPKylEA | https://youtube.com/watch?gl=NL&hl=nl&feature=g-vrec&context=G2584313RVAAAAAAAABA&v=35LqQPKylEA
Non-Matches
http://www.mytube.com/watch?v=35LqQPKylEA | http://www.youtube.com/watch?b=35LqQPKylEA | www.youtube.com
Author Rating: The rating for this expression. Owen Hardy
Title Test Details Comprehensive hyperlink URL
Expression
^(((?:(?:f|ht)tps?(?!\:\/\/[-\.\w]+@)|mailto(?=\:\/\/[-\.\w]+@))\:\/\/)?(?:((?:(?:(?:2(?:[0-4]\d|5[0-5])|[01]?\d?\d))(?:\.(?:2(?:[0-4]\d|5[0-5])|[01]?\d?\d)){3})|(?:(?:[a-zA-Z0-9](?:[-\w]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}(?:(?:\/[-\w]+(?=\/))*)?)|(?:[0-9a-zA-Z](?:[-.\w]*[0-9a-zA-Z])?@(?:[0-9a-zA-Z](?:[-\w]*[0-9a-zA-Z])?\.)+[a-zA-Z]{2,6}(?![\/\?])))(\/[-\w]+)?(?:(?<=\w)\.([a-zA-Z0-9]{2,4}))?(?:(?<=\w)\?([a-zA-Z][-\w]*=[-\w]+(?:&[a-zA-Z][-\w]*=[-\w]+)*))?))$
Description
Designed for full url matching in common hyperlink text including: 1. ftp(s),http(s), and mailto protocols. 2. ip, domain names and sub-domains, and standard email addresses. 3. files with extensions and parameters. Match provides whole match and protocol, address, page, file extension, and parameter sub-matches for use in parsing. If you see anything that can be improved, by all means provide me some feedback. Thanks!
Matches
ftp://255.255.255.255 | http://www.domain.com | mailto://[email protected] | domain.com/dir/page.ext?param=value&param=value
Non-Matches
https://[email protected] | [email protected]/dir?param=value | 256.256.256.256 | ftps://sub.domain.com/.ext | domain.com/?param=value
Author Rating: Not yet rated. Steven Arebalo
Title Test Details URL parameter matching
Expression
[?&]([^&#=]+)(?:=([^&#]*))?
Description
Matches parameters in an URL's query part. The parameters' name and value will be available as subsrting $1 and $2. $2 will be empty if the value is empty (e.g. "…&param=&…") or undefined if there's no equals to sign (e.g. "…&param&…").
Matches
http://example.com/?param=value&emptyParam=&undefinedParam#anchor | https://www.google.com/imghp?hl=en&tab=wi | http://www.youtube.com/results?search_type=videos&search_query=Regular+Expressions&uni=3
Non-Matches
http://example.com/#anchor | http://www.google.com/ | URL's with no GET parameters
Author Rating: Not yet rated. AndreasSE93
Title Test Details Social Security Number (SSN) issued after 6/25/2011
Expression
^(?!000)(?!666)(?!9)\d{3}[- ]?(?!00)\d{2}[- ]?(?!0000)\d{4}$
Description
I am publishing this regex that was written by Stephen M. Redd and taken from the following URL: http://www.reddnet.net/regular-expression-for-validating-a-social-security-number-ssn-issued-after-june-25-2011/. It allows a dash or space separator and accounts for the new numbers that were previously restricted prior to June 25, 2011.
Matches
123456789 | 123-45-6789 | 123 45 6789
Non-Matches
000456789 | 000-45-6789 | 000 45 6789
Author Rating: Not yet rated. Joseph Marinello
Title Test Details Website Validation Regular Expression
Expression
(((ht|f)tp(s)?://)|www.){1}([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?
Description
This expression validate website urls
Matches
http://abc.com,http://www.abc.com,www.abc.com
Non-Matches
wwwz.abc.com,httpac://abc.com
Author Rating: Not yet rated. ark
Title Test Details CSS Url
Expression
url\(['"]?([\w\d_\-\. ]+)['"]?\)
Description
Matches a CSS Background tag. I needed this to replace image links in CSS with data-URI encoded strings.
Matches
background: url("pattern.jpg"); | background: url("yellowcard-bg.png") no-repeat scroll right top #FFFF9E; | color: #607890;
Non-Matches
margin-left: 2em; | list-style-type: decimal;
Author Rating: Not yet rated. HJennerway
Title Test Details URL
Expression
^(http|https|ftp|ftps)\://([a-zA-Z0-9\-]+)(\.[a-zA-Z0-9\-]+)*(\.[a-zA-Z]{2,3})(:[0-9]*)?(/[a-zA-Z0-9_\-]*)*(\.?[a-zA-Z0-9#]{1,10})?([\?][a-zA-Z0-9\-\._\,\'\+&amp;%\$#\=~]*)?$
Description
Matches basic URL strings with optional query string. Remarks: to use this expression in JavaScript you should do the following: 1) when using RegExp("pattern") object you should escape all '\' instances, because they appear in double quotes. 2) when using /pattern/flags syntax, you should escape all '/' instances, because this character indicates an end of an expression.
Matches
http://example.com https://www.example.com:8080/path/path/ http://www.example.com/path/page.html?p1=param1&p2=param2
Non-Matches
example.com http://example.c http://example.com/page.
Author Rating: Not yet rated. Dmitry Tranchenko
Title Test Details URL Validation
Expression
/^\s*(http[s]*\:\/\/)?([wwW]{3}\.)+[a-zA-Z0-9]+\.[a-zA-Z]{2,3}.*$|^http[s]*\:\/\/[^w]{3}[a-zA-Z0-9]+\.[a-zA-Z]{2,3}.*$|http[s]*\:\/\/[0-9]{2,3}\.[0-9]{2,3}\.[0-9]{2,3}\.[0-9]{2,3}.*$/;
Description
it work with and withour http or https
Matches
www.test.com,http://test.com,http://www.test.com
Non-Matches
wwww.test.com
Author Rating: Not yet rated. Krunal Dalia
Title Test Details The Most Complete URI & URL validator, for absolute & relative URLs
Expression
^((http(s){0,1}\:\/\/){0,1}([a-z|A-Z|0-9|\.|\-|_]){4,255}(\:\d{1,5}){0,1}){0,1}((\/([a-z|A-Z|0-9|\.|\-|_]|\%[A-F|a-f|0-9]{2}){1,255}){1,255}\/{0,1}){0,1}(|\/{0,1}\?[a-z|A-Z|0-9|\.|\-|_]{1,255}\=([a-z|A-Z|0-9|\.|\-|_|\+|\:]|\%[A-F|a-f|0-9]{2}|\&[a-z|A-Z]{2,12}\;){0,255}){0,1}((\&[a-z|A-Z|0-9|\.|\-|_]{1,255}\=([a-z|A-Z|0-9|\.|\-|_|\+|\:]|\%[A-F|a-f|0-9]{2}|\&[a-z|A-Z]{2,12}\;){0,255}){0,255})(\/{0,1}|\#([a-z|A-Z|0-9|\.|\-|_|\+|\:]|\%[A-F|a-f|0-9]{2}|\&[a-z|A-Z]{2,12}\;){0,255})$
Description
Validates completely for relative and absolute paths, and allows port definitions. Also contains parameter validation, and allows for anchors and URL escape characters.
Matches
http://www.google.com | https://sub.domain.com:8080/ok | mobi.yoursite.org/%e3498549843 | /relative_path/ok/home.aspx?id=4985&x=5
Non-Matches
http://site.com/?id=4095?x=485 | http://site.com:3098594 | www.site.org?p=this is wrong
Author Rating: The rating for this expression. Stuart Steedman
Title Test Details URL Validation
Expression
/(((ftp|http|https):\/\/)|(\w+:{0,1}\w*@))?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
Description
allow almost url patters
Matches
www.abc.com, http://www.abc.com, abc.com, http://abc.com
Non-Matches
nothing
Author Rating: Not yet rated. Kuldeep Singh
Title Test Details Rather Complete URL regex
Expression
((http(s)?:\/\/)?[a-z0-9-]{3,}(\.[a-z0-9-]{2,})+(:[0-9]+)?((\/[^\/\s.]+\.[^\/\s.,!]+)|(\/[^\/\s.,!]*))*)
Description
This works for valid URLs of all sizes. All slashes have been escaped, replace \/ with / to undo.
Matches
http://google.com, http://google.com/, google.com, https://google.com/, https://www.google.com/imghp?hl=en&tab=wi, http://www.google.com/index.html, http://google.com/samplepage?param=val&p2=val2
Non-Matches
https://www.google.com/index.something.html, http://google.com/samplepage?param=val,&p2=val2, http://google.com/samplepage?param=val!&p2=val2
Author Rating: Not yet rated. Dobri
Change page:   |    Displaying page 9 of 11 pages; Items 161 to 180

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