I have an array having values as following : ['1.hello', '10.hel', '12B.hepl', '9.hell', '12A.help', '2.helo']
I want these sorted as : ['1.hello', '2.helo', '9.hell', '10.hel', '12A.help', '12B.hepl']
Any regex solution would also be preferred. Anything after the .
is not to be considered for sorting the array