Obtenha o subreddit

Published by Pickle in

Crie uma função para extrair o nome do subreddit da sua URL.

Exemplos

subReddit("https://www.reddit.com/r/funny/") ➞ "funny"

subReddit("https://www.reddit.com/r/relationships/") ➞ "relationships"

subReddit("https://www.reddit.com/r/mildlyinteresting/") ➞ "mildlyinteresting"

Notas

N/A