Make a program that takes input of a string and abbreviate it.
- All letters of an abbreviation are capitalized, so keep that in mind.
- Whitespace, numbers and non-English characters are ignored.
- If the inputted string is a paragraph (2+ sentences), the abbreviation will be split by spaces (
!are, while commas (
,) are ignored in this splitting scenario.
- Words that are connected by hyphens (
-) will result to only one letter.
- The only non-alphabetical characters to remain in the result are colons (
:) and semicolons (
- This is code-golf, so shortest program in each language wins.
// Input # Output Hello, World! HW Can you make me a sandwich? CYMMAS hyper-neutrino H Too long; didn't read TL;DR I studied, don't worry. I will pass. ISDW IWP What???!?! W Get me 99 bottles of beer, bro! GMBOBB
[Python 3], 142 bytes d …
[Haskell], 139 138 bytes …