Your challenge is to take words (sequences of [a-zA-Z]
) and truncate them to length 3. For example, never gonna give you up
would become nev gon giv you up
.
Words will not necessarly be delimited by spaces - for example, youtube.com/watch?v=dQw4w9WgXcQ
will become you.com/wat?v=dQw4w9WgX
. Input will be printable ASCII.
This is code-golf, shortest wins!
Testcases
never gonna give you up -> nev gon giv you up
youtube.com/watch?v=dQw4w9WgXcQ -> you.com/wat?v=dQw4w9WgX
code golf -> cod gol
happy_birthday_to_you -> hap_bir_to_you
*hello world* -> *hel wor*
abcd1234fghi -> abc1234fgh
_
underscore? stackoverflow.com/questions/47182265/… \$\endgroup\$