Regular Expressions 101

Community Patterns

url match

0

Regular Expression
Golang

`
(?P<origin>(?P<protocol>http[s]?:)?\/\/(?P<host>[a-z0-9A-Z-_.]+))(?P<port>:\d+)?(?P<path>[\/a-zA-Z0-9-\.]+)?(?P<search>\?[^#\n]+)?(?P<hash>#.*)?
`
gm

Description

url match

Submitted by anonymous - 5 years ago