8
我有一个字符串,它永远是至少一个数字,也可以前包含字母和/或之后数:分割字符串,保留数
"4"
"Section 2"
"4 Section"
"Section 5 Aisle"
我需要拆分像这样的字符串:
"4" becomes "4"
"Section 2" becomes "Section ","2"
"4 Aisle" becomes "4"," Aisle"
"Section 5 Aisle" becomes "Section ","5"," Aisle"
我该如何用Ruby 1.9.2来做到这一点?