Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(?<protocol>((https?)|(sftp)|(ftps?):))?(\/\/)?(?<domain>([a-zA-Z0-9\._-]+))+(?<path>([\/\w.]+))*(\?{0,1})(?<parameters>([&|&amp;]*([\w\.,-]*=*[\w\.,-]*)))*$
/

Description

no description available

Submitted by Naruto(Kenny Fan) - 9 years ago