Regular Expressions 101

Library entries

split URL into location-resource-params

Vote

3

Regular Expression
pcre

/
(?'location'.+)(?:\/(?'resource'[\w\-\._]+\.js))(?:\?(?'params'.+))?
/
gm

Description

Loading markdown...
Submitted by cebence - 7 years ago