Hello everyone!
I have the following problem:
I need to parse the Next route. Don't know how describe the task in words so let me explain it on the example.
[number-number...] means that there can be any number delimited by "-".
| The whole route | Current point | Passed route | Next route |
| [number-number...]-388-[number-number...]-388-[number-number...]-388-201 | 388 | [number-number...]-388-[number-number...]-388 | 388-[number-number...]-388-201 |
| [number-number...]-388-[number-number...]-388-[number-number...]-388-201 | 388 | [number-number...]-388 | 388-[number-number...]-388-201 |
So if current point appears 2 times in passed route than I need to delete data after second appearance of the current point. If current point appears 1 time in passed route than I need to delete data after first appearance of the current point. If current point appears 3 times in passed route than I need to delete data after third appearance of the current point. Etc