Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
^(http[s]?:\/\/)?([^:\/\s]+)(:([^\/]*))?(\/\w+\.)*([^#?\s]+)(\?([^#]*))?(#(.*))?$
"
i

Description

Break a URL into parts: protocol url path get parameters hash

Submitted by Dale O'Brien - 11 years ago