How to extract int from a sting please help

input: hello132myname254khf
output: 132,254

you can ascii value of a character to see if they are an integer or not, now you just have to find contiguous substrings such that each character is integer and once you find such string push it into vector.
code:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.