I have raw txt files and need to use regex to search each digit separated by space.
Question, data format is like:
6 3 1 0
7 3 1 0
8 35002 0
9 34104 0
My regex is:
(?P<COORD>\d+)
The matched output for first two lines are, (6,3,1,0) and (7,3,1,0) which are correct. However, it doesn't apply to last two lines, their output are (8, 35002, 0) and (9, 34104, 0). The correct grouping numbers should be (8, 3, 5002, 0) and (9, 3, 4104, 0). How can I solve this?