Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Parsing a URI Reference with a Regular Expression
chiunam
follow
0
6-19-2007 8:55 PM
509 views
tags:
regex
,
uri
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Related Clips
Cheat Sheet Roundup - Over 30 Cheatsheets ...
SQL Server 2005 List all IDENTITY columns
Display your Clipmarks on your Facebook pr...
Cheat Sheets
RegEx: Valid FilePath.
CSV Regex
regex pattern for turning URLs into hyperl...
More clips from
chiunam
No. of internt users without Javascript
Displaying a tick mark in HTML
How To - Configure Ubuntu for Microsoft Vi...
Today's Top Clips
Marijuana improves memory
THE IMPRINTED BRAIN THEORY
The Boy With The Incredible Brain
What Happy People Don't Do
This Dog is Awesome!
Most Beautiful Homeless Hostel in the World
The Secret to staying Madly in Love
Vatican: Homosexuality is a "grave sin"
Forgotten But Not Gone: How The Brain Re-learns
Physicists Find Dark Matter, or Something Even More Strange
visit the
Top Clips page
View the Top Clips from
June 19, 2007
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/f9f9370f-27b0-4c9e-a937-5e210c183102/58EA03BA-A567-40DF-92E6-DD89D5A609BD/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://www.ietf.org/rfc/rfc2396.txt" href="http://www.ietf.org/rfc/rfc2396.txt" style="font-size: 11px;">www.ietf.org</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.ietf.org/rfc/rfc2396.txt">The following line is the regular expression for breaking-down a URI reference into its components. ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? 12 3 4 5 6 7 8 9 The numbers in the second line above are only to assist readability; they indicate the reference points for each subexpression (i.e., each paired parenthesis). We refer to the value matched for subexpression <n> as $<n>. For example, matching the above expression to http://www.ics.uci.edu/pub/ietf/uri/#Related results in the following subexpression matches: $1 = http: $2 = http $3 = //www.ics.uci.edu $4 = www.ics.uci.edu $5 = /pub/ietf/uri/ $6 = <undefined> $7 = <undefined> $8 = #Related $9 = Related </blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/58EA03BA-A567-40DF-92E6-DD89D5A609BD/blog/" title="blog or email this clip"><img src="http://content9.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Blog
Copyright
Privacy
EULA
OK