The input variable contains one or more numeric strings in its character set, not having a fixed size and can have space between letters and numbers. In both cases, I need to identify only the first numerical sequence that appears in the string (it will never be separated by a space). Some examples of the input string:
"a12bcde097fg" >> return 12
"120abc198672f" >> return 120
"a052bcd123fg" >> return 052
"a 52 - bcd12" >> return 52
"A b 123 cd 1" >> return 123
Is there a way to do this with a single command and be effective in all situations?