I have strings like
AS_!SD 2453iur ks@d9304-52kasd
I need to get the 2 frist numbres of the string:
for that case will be:
You can loop chars of your string parsing them, if you got a exception thats a letter if not is a number them you must to have a list to add this two numbers, and a counter to limitate this.
follow a pseudocode:
for char in string:
if counter == 2:
stop loop
if parse gets exception
continue
else
loop again in samestring stating this point
if parse gets exception
stop loop
else add char to list