You are not logged in.
Hi,
I have some filenames of the form:
136037-QP-2012-May-15-unit-a221-01-unit-01-b1-b2-b3-F
I have tried to use S&R with wildcards to relocate the numeric sequence at the beginning (which could be 4-8 numbers followed by dash) to the end to give:
QP-2012-May-15-unit-a221-01-unit-01-b1-b2-b3-F-136037
I have used many variations on the theme including:
"\A([\d]+)-(.+)" ==> "$2-$1"
and even:
"(\A[\d]+)-(.+)" ==> "$2-$1"
and
"^([\d]+-(.+)" ==> "$2-$1"
Nothing ever gets replaced.
Even the simple form given in this forum "\A[\d\-\.\s]+(.+)" ==> $1 does not strip the leading digits when reduced to "\A[\d]+(.+)"
Using Renamer Lite version 5.76
Thanks, Ric
Offline
Hi Ric,
Your first two patterns work as expected:
* RegEx: Replace expression "\A([\d]+)-(.+)" with "$2-$1" (skip extension)
OR
* RegEx: Replace expression "(\A[\d]+)-(.+)" with "$2-$1" (skip extension)
Input: 136037-QP-2012-May-15-unit-a221-01-unit-01-b1-b2-b3-F
Output: QP-2012-May-15-unit-a221-01-unit-01-b1-b2-b3-F-136037
Your patterns make use of regular expressions (not wildcards), so make sure you use RegEx rule.
Offline
Doh!
It would have helped if I'd looked down the list and spotted RegEx rather than slavishly (and somewhat blindly) banging on the door of replacing using wildcards!
Thanks,
Ric
Offline