Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(\w:(?:\\|\/)[\s\S]+?(?:$|\n))|(\/[\s\S]+?(?:$|\n))|(^(?:https?:)?\/\/(?:www\.)?[-\w@:%.\+~#=]{1,256}\.[\w()]{1,6}\b(?:[-\w()@:%\+.~#?&\/\/=]*)(?:$|\n))
/
gm

Description

Windows Linux and Web OS Paths checked Regex

Submitted by anonymous - 5 years ago