s = "We bought 3.5 million shirts."res = s.scan(/\p{L}+|(?!\.\d)[[:punct:]]/)puts res
Standard input is empty
We bought million shirts .
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!