Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-11-15 04:27
Flavor·PCRE2 (PHP)

/
(http:\/\/|https:\/\/)?[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*(\.[a-zA-Z0-9]{1,10})((\/+)[^\/ ]*)*
/
gm
Open regex in editor

Description

I think this is the regex that Twitch uses to determine what is a clickable link on chat.

Submitted by emongev