Possible Duplicate:
Split string based on delimiter in bash?
I have a bunch of files named test<numbers or letters>.<number>.out so like test1.1024.out or test2.2.out. Is there some way I can use a regular expression like ^test.*?..(.*).out$ to parse out the middle number on each file and then be able to access the group?