YouTube Channel ID Regular Expression

Category: URI

A regular expression to match a YouTube Channel ID.

/https?:\/\/(www\.)?youtube.com\/channel\/UC([-_a-z0-9]{22})/i

Matches:

  • https://www.youtube.com/channel/UCv4Cecqpm3cOv7N5N9NkMsQ
  • https://www.youtube.com/channel/UCS94J1s6-qc8v7btCdS2pNg
  • https://www.youtube.com/channel/UCvlE5gTbOvjiolFlEm-c_Ow

Non-matches:

  • http://www.youtube.com/watch?v=BeG_UU-Bf5k
  • http://youtu.be/BeG_UU-Bf5k

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.