Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^((spotify:track:)|(https?:\/\/((open)|(play))\.spotify\.com\/((track)|(album)|(artist))\/))[[:alnum:]]{22}
/
g

Description

Pattern to match any possible spotify link as of july 2017.

Submitted by anonymous - 7 years ago