title: Spotify urls regex
body: <p>I am having some trouble with Regex. Basically what I want to do is take any either of these types of spotify urls for a playlist</p>
  
  <p><code>https://open.spotify.com/user/spotify/playlist/37i9dQZF1DZ06evO2ZpGiQ?si=-6S0EBlURrao__YyIOW6bg</code></p>
  
  <p>or</p>
  
  <p><code>spotify:user:spotify:playlist:37i9dQZF1DZ06evO2ZpGiQ</code></p>
  
  <p>And get the user id which would be <code>spotify</code> for these URLs and would like to get the playlist id which would be <code>37i9dQZF1DZ06evO2ZpGiQ</code> for these URLs</p>
  
  <p>I also would like to have some regex that would make sure it is either one of these URL types. </p>
  
  <p>So far I have tried this regex to check if it is a spotify url using this regex:</p>
  
  <p><code>^(spotify:|https:\/\/[a-z]+\.spotify\.com\/)</code> but it only matches the top URL.</p>