If you have a string in r, that has something like...
messystuffSample0001moremessystuff and you would like to get Sample0001
What would be a good way of doing that, especially if messystuff, and moremessystuff vary in content and size. The part of interest is "Sample" plus the 4 digits.