Skip to content
C

Hashtag Extractor

Easypython

Given a social media post, extract all hashtags (words starting with #) using regex.

Approach: the pattern #\w+ matches a # immediately followed by one or more word characters.

Input: One line: a post, possibly containing hashtags.

Output: One line: every hashtag found, printed as a Python list, in order.

Input (stdin)

Output

Run your code to see output here...