Submitted by pmdevita - 9 months ago
Reddit URL Regex
Regex for parsing subreddit, IDs, and URL params out of a Reddit URL. Battle-hardened and tested for over three years on Reddit bots GifReversingBot, vredditshare, and switcharoohelper.
Returns the following information if it is exists in a Reddit URL
/r/ or /user/ depending on whether this is in ...