Regular Expressions 101

url and path match with or without http|https

Open Workspace
  • PCRE (Legacy)
  • Match
0

Regular Expression

/
^(https?:\/\/)?([\da-z-]+\.)+([a-z]{2,6})?(\/([a-z0-9+\$_-]\.?)+)*\/?$
/

Description

this is the most perfect pattern I reach for url with query or anchor

Submitted by Gehad Mohamed