Find the first word starting with each letter Given a string, find the first word starting with each letter (case insensitive).

Sample

Using Ferulas flourish in gorgeous gardens. as input:

"Ferulas flourish in gorgeous gardens."
 ^^^^^^^          ^^ ^^^^^^^^
 |                |  |
 |                |  --&gt; is the first word starting with `g`
 |                --&gt; is the first word starting with `i`
 --&gt; is the first word starting with `f`


Then, the output for this sample should be the matched words joined by one single space:

"Ferulas in gorgeous"


Challenge

Both input and output must be a string representation, or the closest alternative in your language.

Program or function allowed.

You can consider a word being at least one of: lowercase or uppercase letters, digits, underscore.

This is code-golf, shortest answer in bytes wins.

Another samples:

input: "Take all first words for each letter... this is a test"
output: "Take all first words each letter is"




input: "Look ^_^ .... There are 3 little dogs :)"
output: "Look _ There are 3 dogs"




input: "...maybe some day 1 plus 2 plus 20 could result in 3"
output: "maybe some day 1 plus 2 could result in 3"
Retina, 28 bytes:


M!i`\b(\w)(?&lt;!\b\1.+)\w*
¶
&#32



M! - Match each work and print all words separated by newlines.
i - Ignore case.
\b(\w) - Capture first letter of each word
(?&lt;!\b\1.+) - After matching the letter, check if there wasn't a previous word starting with the same letter. \1.+ ensures at least two characters, so we are skipping the current word.
\w* - match the rest of the word.
The above matches only words - all other characters are removed.
¶\n&#32; - Replace newlines with spaces.


Try it online!