Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^((https:\/\/)|(http:\/\/))
/
gmi

Description

Remove either "HTTPS://" or "HTTP://" from the beginning of any string. Flags for multi-line and case-insensitive search are set. Multiline matches text if it is the beginning of the new line. Only matches the beginning of the string or of a new line.

Submitted by anonymous - 3 years ago