I'm trying to match and keep all the following text (including the numbers) until next set of numbers
string = "100 - Generic - Applicable (Prepaid leg) 101 - TFM - N/A 102 - TOPUP - Applicable (Prepaid leg) 103 - Staff - Applicable (Prepaid leg)"
my regex below grabs the next set of digits too and breaks the rest as you can see
\b(\d{3}.*?\s\d{3})
essentially the result should look like this
list = ['100 - Generic - Applicable (Prepaid leg)','101 - TFM - N/A','etc','etc']
https://regex101.com/r/2QOMzy/1
I'm struggling to tell it to exclude\stop at the last pattern. I've looked at these, with out success obviously:
https://stackoverflow.com/questions/43899304/pcre-regex-matching-patterns-until-next-pattern-is-found
https://stackoverflow.com/questions/49487978/regex-to-match-pattern-until-next-occurence-of-it
https://stackoverflow.com/questions/33249035/regex-match-from-pattern-until-another-pattern