Hi David, excellent presentation of an question, thanks
Now i try as i have understood...
FROM:
0016'Broadway It's Not' February 10, 1981. (-) ERIN MORAN;SCOTT BAIO' February 10, 1981. ( Pho.jpg
TO:
0016'Broadway It's Not' February 10, 1981. (-) ERIN MORAN;SCOTT BAIO.jpg
RegEx(1)
Match: (.+)'
Repla: \1
Explanation:
match anything greedy till an '
. means search any char or sign
+ means one-or-more of this till you have found all you can get
() means group the match for backreference
\1 means give me the contain of group 1
------------------
FROM:
0016'Broadway It's Not' February 10, 1981. (-) ERIN MORAN;SCOTT BAIO.jpg
TO:
'Broadway It's Not' February 10, 1981. (-) ERIN MORAN;SCOTT BAIO.jpg
RegEx(1)
Match: (.+?)('.+)
Repla: \2
Explanation:
match anything non-greedy till an '
. means search any char or sign
+? means one-or-more of this, but stop if the very next term is found
() means group the match for backreference
('.+) means anything else, incl. the ' -sign
\2 means give me the contain of group 2, while we drop the \1-group
Hint: the first group \1 is not really needed here, but it disturbs us not too. So Match: .+?('.+) with Repla: \1 should work too.
---------------
Bring the year to the beginning:
I hope there is only exactly ONE 4-digit number in your string?
FROM:
'Broadway It's Not' February 10, 1981. (-) ERIN MORAN;SCOTT BAIO.jpg
TO:
1981'Broadway It's Not' February 10, . (-) ERIN MORAN;SCOTT BAIO.jpg
RegEx(1)
Match: (.+?)(\d{4})(.+)
Repla: \2\1\3
Explanation:
match anything non-greedy till an 4-digit number
(.+?) = match anything non-greedy till 1981 ====> \1 will hold "'Broadway It's Not' February 10, "
(\d{4}) = an number like '1981' , \d means an digit, {4} means 4 of them ====> \2 = will hold "1981"
(.+) = you should know now already ====> \3 = will hold the rest: " . (-) ERIN MORAN;SCOTT BAIO"
Now replace the string with the backreference groups in any order you like,
e.g. as you asked for: \2\1\3
I hope i have covered all of your question.
I think the first two RegEx's can be combined two one... but first do an test if they works the way you want.
See this older threads for an RegEx syntax overview:
=> Getting Started: http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=3&t=5
=> Go ahead: http://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=3&t=27
HTH
If yes: please help two others too.