Regular Expressions 101

Community Patterns

1...56789...285

URI Parser

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)