Expression |
(?m)^(?<scheme>\w+?://)?(?<path>(?:[\w.%$\-_+!*'(),=@]+\/|\b)+(?:[\w.%$\-_+!*'(),=@]*))(?<query>\?(?:[\w.%$\-_+!*'(),=@]+=[\w.%$\-_+!*'(),=@]*&?)*)?(?<fragment>#[\w\.%$\-_+!*'(),=@]*)? |
Description |
Identifies scheme, path, query, and fragment in any URI, putting them into named groups. All groups are optional except path. |