I have a text file with data like these:
ISP-123456 2 2 2 2
ASI-123213 2 3 1 5
PSI-123233 3 2 3 7
SRI-213232 1 4 9
SIR-122323 1 2 24 0
Suppose I want the last two values from each row (2 2, 1 5, 3 7, and 4 9), how can I achieve this? Note that these rows do not have the same number of column, but the values are always in the correct position. I'm thinking about a regular expression that will trim data starting with the second whitespace counting from the end of each row.
Update:
Thank you for the responses! But they remind me that I should be more clear with my question. Sorry for the incomplete example. I have added row five. As can be seen, the values can have more than one digit (24 0). In this case I still want the last two values of each row.