Regular Expressions 101

Community Patterns

Keep only domain and protocol it present.

0

Regular Expression
PCRE2 (PHP >=7.3)

#
(^(?:https?://)?(?:[^/]*))
#
mg

Description

Keep only domain and protocol it present.

Submitted by EcoTechie - 2 years ago