Regular Expressions 101

Community Patterns

Twitch Clickable URL Regex

0

Regular Expression
PCRE2 (PHP >=7.3)

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

Description

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

Submitted by emongev - 2 years ago