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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find url chunks
Expression
(http|ftp|https):\/\/(\w[\w\-_\.]*\.)?([_\-\w]+)(:[0-9]+)?([\/[\w_\.-]+]*)\/(\.?\w[\w._-]*[\w_-])?(#\w+)?([\w\-\.,@?^=%&:\~\+#]*[\w\-\@?^=%&\/\~\+#])?
Description
divides an url into the different parts: protocol, subdomain, tld, port, folder, file, anchor, parameter
Matches
http://www.example.com/folder/file.php#anchor?parameter=value
Non-Matches
www.example.com
Author Rating: The rating for this expression. sir-saimn
Source by me
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

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