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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 3
Title Test Details Pattern Title
Expression
^((((H|h)(T|t)|(F|f))(T|t)(P|p)((S|s)?))\://)?(www.|[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,6}(\:[0-9]{1,5})*(/($|[a-zA-Z0-9\.\,\;\?\'\\\+&%\$#\=~_\-]+))*$
Description
Matches URLS that start with numbers and any TLD that is 2 to 6 characters long. Matches most URLs. Thanks to eveyone for suggesting modifications! UPDATES::[Nov. 11, 2005] Now it matches uppercase and lower case protocols. Updates::December 3, 2005 Added restriction to ports since they will only go up to 65535. (Thanks lorello) Keep the suggestions coming! Thanks for the heads up!!
Matches
hTtP://3iem.net/ | http://3iem.museum:1337/ | plik.co.uk
Non-Matches
http://foobar | lameurl.toolongtld
Author Rating: The rating for this expression. Phil Cogbill
Title Test Details Pattern Title
Expression
^(((ht|f)tp(s?))\://).*$
Description
Identifies http, https, ftp, and ftps
Matches
http://3iem.net/ | https://foo.org | ftps://jormahma.tk/
Non-Matches
yahoo.com | lame://protocol.us
Author Rating: The rating for this expression. Phil Cogbill
Title Test Details Pattern Title
Expression
target[ ]*[=]([ ]*)(["]|['])*([_])*([A-Za-z0-9])+(["])*
Description
Matches the HTML "target" attribute. I had an editor that edited pages but whe wysiwyg editor would break on link that had a target to say "_top" or another window. So I needed an expression to match the target attribute on links in HTML.
Matches
target = "_top" | target = _top | target = "foo"
Non-Matches
target foo | target "foo" | target = ""
Author Rating: The rating for this expression. Phil Cogbill
   Displaying page 1 of 1 pages; Items 1 to 3

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