I am new to regex in python. I have the following line and you want to break them into five categories. I just use split (), but it just breaks into white spaces.
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"]
How can I write a regex to make it broken like this:
["1", "0", "A10B", "1/00", "Description: This is description with spaces"]
Can anyone help? Thanks!
source share