Regular Expressions 101

Community Patterns

1...34567...900

Community Library Entry

1

Regular Expression
Python

r"
((http|https)+\:\/\/)?([\w\d-]+\.)*[\w-]+[\.\:]\w+([\/\?\=\&\#\.]?[\w-]+)*\/?
"
gm

Description

From any text identify a web url. File or ftp urls are not a part of the regex.

Submitted by wongz - https://stackoverflow.com/a/63022807/326835 - 3 years ago