Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(^$|(http(s)?:\/\/)([\w-]+\.)+[\w-]+([\w- ;,.\/?%&=]*))
/

Description

This will validate whether you starts with http(s)://

Submitted by Sanal Menon Kalipurayath - 10 years ago