string manipulation in BASH
I would like to extract numbers 5, 15, 35 from filenames like (the second number in name):
How to do this?
I was thinking to apply command like
`expr index "$fileName" '.*box.*'`
in a loop, but it gives me back wrong position of the first number (2). What I do wrong here?