You are not logged in.
Pages: 1
Good day all,
I am way past my self imposed limit of 8 hours of trying to get something to work. I searched every regex post here I could think of and didn't find anything that worked.
My sample folders are below. I want to find the yyyymm in the folder name and move IT to the first word plus a "-" and then remove it from the filename. I used (\d\d\d\d\d\d) this to find it, but no combination of $n to $x places it correctly. I used the denb4 regex checker and anywhere else google put me. very very frustrated......
birds-film-herrick-200107-n400 to 200107-birds-film-herrick-n400
brenwood-200310-m7-65mm-tri-x to 200310-brenwood-m7-65mm-tri-x
thank you in advance!!!!!
Brian
Offline
Good day to you too, Brian.
You will achieve what you want by using the following regular expression:
\A(.*?)-?(\d{6})-?(.*)\Z
With the following replacement pattern:
$2-$1-$3
Offline
Could answer faster next time? ;-]]] Thank you so much. It is no wonder I couldn't get it to work.
All the best,
Brian
Offline
Pages: 1