Regular Expressions 101

Community Patterns

Community Library Entry

-1

Regular Expression
PCRE (PHP <7.3)

/
(?<protokoll>[a-z]*):\/\/?(?<domain>[a-z.-]*)?(?<file>[^?#]*)?[?](?<parameter>[^#]*)?[#](?<anker>.*)?
/

Description

split URL in protokoll, domain, file(with path), parameter and anker

Submitted by Candyman - 9 years ago