我对python中的正则表达式很陌生。我有以下字符串,想将它们分成五类。我只是使用 split() 但它只会根据空格进行拆分。
s = "1 0 A10B 1/00 Description: This is description with spaces"
sp = s.split()
>>> sp
["1", "0", "A10B", "1/00", "Description:", "This", "is", "description", "with", "spaces"]
如何编写正则表达式以使其像这样拆分:
["1", "0", "A10B", "1/00", "Description: This is description with spaces"]
有人可以帮忙吗?谢谢!