Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
ECMAScript (JavaScript)

/
(?<scheme>.*):\/\/(?<authority>[^\/]*)(?:\/(?<path>[^\?]*))?(?:\?(?<query>[^#]*))?(?:#(?<fragment>.*))?
/

Description

A simple parser to exact all the components of a URI/URL as named groups

Submitted by Vespion - a year ago (Last modified a year ago)