提取单词前后的数字:
String q = 'Consumer spending in the US rose to about 62% of GDP in 1960, where it stayed until about 1981, and has since risen to 71% in 2013'
q = re.findall(r'^([^\d]+)\s(\d+)\s*,\s*([^\d]+)\s(\d+)',s)
它给出了 Gives 中所有单词和数字的列表q
。所以现在我想要方法来获取数字和单词