I know it sounds like another thread, but that was too simple for needs.
Here is what I am trying to do with BRC and reg exp.
I am taking a file xfr-l1234 Boise Race 2010.jpg and moving it to its pre-made directory. It most often is the car's number and drivers last name or another description i.e. 003 Smith or R3H2 Modified Sleds, but at times it may a combination of letters and numbers or for special fun, just letters.
I am then removing the xfr from the file name and trying to replace it with only the first portion of the directory name.
I have set up BRC so that I can add the folder name to the file name, but I am having the darnedest time figuring out how to capture just the first group of numbers (or letters and/or numbers) i.e. the 003 or the R3H2 from the file name, then dropping the name or descriptor and keeping everything after the hyphen. That first group of alpha numeric is not always the same length either.
If it was always only digits, I could handle that from what learned on the other threads. It is the problem with when I get to alpha-numerics that I cannot work out.
I have tried to figure this out for about 8hrs. I have looked at all the other threads, and the only thing I know is I have a major headache.
I believe I have the stuff after the hyphen with this \-(.*)
Can someone nudge me towards an idea of how to grab only the first grouping of lettering in the file name after adding the directory name? I am hoping there is some magical expression that will do both just the numbers and the alpha-numerics.
Some more examples of the folder names that I contend with ( I really only want the first letters and/or numbers before the first space):
107 Collins I want 107 for the file name
5XA Prelim XC A I want 5XA for the file name
and for just a kicker, I sometimes add a space before the first grouping, so that it comes at the top of the directory listing
BNAA Beg Nov A Awards I want BNAA for the file name
Thank you.