如何用正则表达式从一个String中提取出英文单词?
String中可能含有中文等等任何字符,但是最终提取出来的是英文,
而且要考虑考he's或者low-income这类情况,也就是能吧
he's和low-inome都识别为一个单词,而不是拆分为he s low income四个单词。
比如有一个String如下:
"He's a boy.And she has a low-income.
------ 中国(china)是------He's a student."
提出出来的单词是:
He's
a
boy
And
she
has
a
low-income
china
student