You are not logged in.
Hi there. The program is great, but the problem is my brain. It doesn't work with regex's.
This is what I'm trying to do:
Rename a folder full of pdfs titled (First name Middle initial Last name):
Bob Q. Smith.pdf
Jack B. Jones.pdf
Sue L. Wilson.pdf
etc.. to Last name First name Middle initial, like this:
Smith Bob Q.pdf
Jones Jack B.pdf
Wilson Sue L.pdf
any suggestions? Thanks!
Offline
You can use dot as the "to-find" point.
regex: ([^.]+)\.\s(.+) or ^([^.]+)\.\s(.+)$
replace: $2 $1
Remember to have skip extention on.
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
Rename a folder full of pdfs titled (First name Middle initial Last name):
Bob Q. Smith.pdf
Jack B. Jones.pdf
Sue L. Wilson.pdfetc.. to Last name First name Middle initial, like this:
Smith Bob Q.pdf
Jones Jack B.pdf
Wilson Sue L.pdf
Hi ehamiter, welcome.
Here i have made krtek tipp more simple to understood by simplify the regex:
Add new rule, chose RegEx:
Expression: (.+)\. (.+)
Replace: $2 $1
[x] skip extension
Explanation:
. means any char
+ means one or more
\. means find dot itself
So (.+)\. means find one or more chars till an dot is found (ReNamer is non-greedy and stops at first dot found)
Then i search for an blank and then for the rest of the name with (.+) again.
HTH?
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
(ReNamer is non-greedy and stops at first dot found)
mmm... sorry but... my experience is not that.
to stop in the first dot I must write "(.+?)\. (.+)"
If this software has helped you, consider getting your pro version. :)
Offline
Stefan, it would be quite weird if the + were non-gready in ReNamer as I suppose it is described as greedy in regex's specification.
I use a repetition of "any sign but not a dot" ([^.]) as it is more specific. It allways stops on the first dot no matter if you use greedy + or non-greedy +?.
Last edited by krtek (2009-07-25 21:01)
Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).
Offline
Of course you are right!
It was an false assuming of me at this time.
This behaviour has nothing to do with RegEx but just in this simple file names
there are one dot only since i opt "skip extension" and that was the whole trick.
For this example file names above my simple solution works well enough that's why i provide it.
Thanks for clarifying guys. ReNamer works as expected.
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline