Missed the point but thanks for playing. 😉 What’s potentially too clever isn’t the use of regex, but doing both splits simultaneously and using each_slice(2) for combining them again.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks. It’s potentially too clever, but it does avoid the
map
+split
combo for separating first and last names.Anyone who says rex is too clever clearly hasn't bumped into bit-shifting code-golf lol
Rex is a very appropriate amount of cleverness 😉
Missed the point but thanks for playing. 😉 What’s potentially too clever isn’t the use of regex, but doing both splits simultaneously and using
each_slice(2)
for combining them again.