Regular Expressions 101

Community Patterns

Beautiful Regex for detecting Slack URL's

2

Regular Expression
PCRE (PHP <7.3)

/
<(https?:\/\/[\w]+(?:\.[\w]+)+(?:\/[\w-?=%&@$#_.+]+)*\/?)(?:\|((?:[^>])+))?>
/
g

Description

just lovely

Submitted by the boiz aka ben and chris - 9 years ago