您不需要正则表达式。
>>> txt = """Hello. It's good to meet you.... My name is Bob.""">>> txt.split('.')['Hello', " It's good to meet you", 'nMy name is Bob', '']>>> [x for x in map(str.strip, txt.split('.')) if x]['Hello', "It's good to meet you", 'My name is Bob']
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)