Regular Expressions 101

URL matching

Open Workspace
  • Python
  • Match
1

Regular Expression

r"
(([A-Za-z]{3,9}:(?:\/\/)|www\.)[A-Za-z0-9.-]+((?:\/[-\+~%\/.\w_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)
"
ig

Description

Matches URLs in texts.

Forked from https://regex101.com/r/cX0pJ8/1 , then removed matching emails

Submitted by Anonymous