I have the following example strings
"CTS3010 - 6ppl"
or
"CTs3200 - 14ppl"
or
"CTS-500 2ppl"
and i need to parse out the number from these strings. What is the best way to parse out the number before the "ppl" at the end of the string. Do i need regex? I have logic to loop backward but it feels like there is a more elegant solution here.
These are just examples but all examples seem to follow the same pattern being
- A bunch of text
- A number
- ppl suffix