◂ BACK TO COURSE
Extract HashtagsPAR 110
mediumD ×1.8 VERIFIED SOLVABLE
Extract Hashtags Extract every hashtag from the input text. A hashtag is a character immediately followed by one or more "word" characters (ASCII letters A-Z/a-z, digits 0-9, or underscore _). A hashtag can appear anywhere — even attached directly to another word. The hashtag includes its leading . Output all hashtags found, separated by commas (order does not matter), each keeping its leading . If the text contains no hashtags, output an empty string (nothing at all). Matching is case-insensitive for grading, so tags that differ only in letter case count as the same hashtag. Output format A comma-separated list of hashtags (each starting with ), or an empty string if none.
PUBLIC EXAMPLES
INLove this #sunset photo! #photography #Sunset
OUT#sunset, #photography
INno hashtags in this sentence at all
OUT(empty)
~1 strokes / par 110 ⌘↵ submit · openrouter:openai/gpt-oss-20b:free