wes d2a2ba9e15 first commit | 4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago | |
code.cpp | 4 years ago | |
unitTest.cpp | 4 years ago |
by Helen Yu tags: strings, regex
Create a function to extract the name of the subreddit from its URL. Examples subReddit("https://www.reddit.com/r/funny/") ➞ "funny" subReddit("https://www.reddit.com/r/relationships/") ➞ "relationships" subReddit("https://www.reddit.com/r/mildlyinteresting/") ➞ "mildlyinteresting" Notes N/A
Create a function to extract the name of the subreddit from its URL.
subReddit("https://www.reddit.com/r/funny/") ➞ "funny"
subReddit("https://www.reddit.com/r/relationships/") ➞ "relationships"
subReddit("https://www.reddit.com/r/mildlyinteresting/") ➞ "mildlyinteresting"
N/A