I want to sort out words which are started with 's' in sentence by python.
Here is my code:
import re
text = "I was searching my source to make a big desk yesterday."
m = re.findall(r'[s]w+', text)
print m
But the result of code is :
['searching', 'source', 'sk', 'sterday'].
How do I write a code about regular expression? Or, is there any method to sort out words?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…