Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

Keep only domain and protocol it present.

Submitted by EcoTechie - 3 years ago