#1 : 02/11-11 17:13 Desi Fitness
Posts: 6
|
Hi - This is my first post. Congratulations on writing this amazing piece of software, very nice work.
My question is how do I separate capitalized text from a sentence (with spaces). eg: Source Filename: This is AFileNameTo be cleaned.txt Renamed File: This is A File Name To be cleaned.txt Thanks! |
#2 : 02/11-11 17:23 Desi Fitness
Posts: 6
|
Reply to #1:
I just figured the solution (in another post): Rule 1: Replace Text to be replaced: ([A-Z]) Replace with: \1 Case sensitive: checked Use regular expressions: checked Note: Text to be replaced has a space before the \1 (or whatever character needs to be used as filler between the capitals) Rule 2: Remove Remove Count: 1 Starting at: 1 Backwards: Unchecked Use regular expressions: Unchecked Works like a charm! |
#3 : 03/11-11 05:12 Desi Fitness
Posts: 6
|
Reply to #2:
Actually this solution does not work because all files may not have Rule #1 applied which results in Rule#2 being applied, resulting in the first character being deleted from files where ONLY Rule#2 gets applied. So there's still not a real "Separate Capitalized Text" solution unless I am missing something. |
#4 : 03/11-11 10:37 Kim Jensen
Administrator
Posts: 883 |
Reply to #1:
Try using this preset: www.advancedrenamer.com/down/forum/separate_capitalized_text.aren The big difference from your suggestion is rule #2. Rule 1: Replace Text to be replaced: ([A-Z]) Replace with: \1 (contains a space before \1) Case sensitive: checked Use regular expressions: checked Rule 2: Replace Text to be replaced: (two spaces) Replace with: (one space) Rule 3: Replace Text to be replaced: ^ (notice the space after ^) Replace with: (leave blank) Use regular expressions: checked What is done in the first is that it adds a space in front of every capital letter. This means that a space is added to the front of the file name and in front of every capital letter already having a space in front of it. Rule number 2 takes care of the double spaces and rule number 3 takes care of the space as the first character. If the filename is not starting with a capital letter, the first character will not get chopped. I hope this works for you. I think I might include this preset in a later release or upload it as an example in the user guide. |
#5 : 03/11-11 17:04 Desi Fitness
Posts: 6
|
Reply to #4:
Thanks, that helps! -Kartik |