You are not logged in.
Pages: 1
Hello again!
You were all so nice & helpful last time, I decided to bug you again
A common problem I'm running into is files with names like this:
"EdwinArlingtonRobinson-Merlin"
Is there a way to insert a space before each capital letter? I've been doing them manually, and it takes FOREVER.
Thanks so much - you guys are awesome
Offline
Hi April, we have thought about such your issue already beforehand,
FROM:
EdwinArlingtonRobinson-Merlin
TO:
Edwin Arlington Robinson-Merlin
please take an look at >> http://www.den4b.com/wiki/ReNamer:Rules:CleanUp
- - -
For your special case "Robinson-Merlin" you can use an additional RegEx Rule:
FROM:
EdwinArlingtonRobinson-Merlin
TO:
Edwin Arlington Robinson - Merlin
1) CleanUp: Insert space in front of capitals, Fix spaces (skip extension)
2) RegEx: Replace expression "([a-z])-([A-Z])" with "$1 - $2" (case-sensitive) (skip extension)
####
I guess i should not take you that exactly with
"Is there a way to insert a space before each capital letter?"
but not before an hyphen ? ;-)
If surely, use:
1) CleanUp: Insert space in front of capitals, Fix spaces (skip extension)
2) RegEx: Replace expression "([a-z])-([A-Z])" with "$1- $2" (case-sensitive) (skip extension)
to get "Edwin Arlington Robinson- Merlin" in real.
####
BTW: Instead of one CleanUp plus one RegEx Rule you can also use two RegEx Rules like:
1) RegEx: Replace expression "([a-z])([A-Z])" with "$1 $2" (case-sensitive) (skip extension)
2) RegEx: Replace expression "([a-z])-([A-Z])" with "$1 - $2" (case-sensitive) (skip extension)
HTH?
.
(Thanks to Denis for the "Export rules to clipboard" feature!)
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
Stefan,
Will you marry me?
(Just kidding, but thanks again!)
April
Offline
Stefan your method worked flawslessly.
I used the following rule to insert a hypen before every Capitalized word except the first.
([a-z])([A-Z])
$1_$2
Checkbox: Skip extension, Case sensitive
I have 3questions though.
What if I only want to add a hyphen, before only the 2nd capitalized word?
Or,
At only the 3rd capitalized word?
Or,
For the 2nd and 3rd capitalized words (specify range)?
I have a file named:
JimCanson_DepartmentManufacture,
and then transform it to:
Jim_Canson_DepartmentManfacture, not Jim_Canson_Department_Manufacture
Last edited by lanceru (2015-09-29 19:15)
Offline
WARNING: DO NOT POST YOUR QUESTIONS IN TOPICS THAT ARE YEARS OLD! START A NEW THREAD!
Your question has been answered in a different thread.
Offline
Pages: 1