Maxa
1
Regular Expressions
Old name: (.*[^A-Z])(.*[A-Z])#
New name: \1 \2
Case sensitive. Yes
Ignore extension: No
I Get:
Old string: FileNameWithNoSpaces.txt
New string: FileNameWithNo
And I thought I get: File Name With No Spaces.txt
Thank You for Your advice
Maxa
Leo
2
Change the old name to: (.*[^A-Z ])([A-Z].*)#
Maxa
3
Great!
Thank You!
How about adding space before string of numbers:
File12345With1Spaces.txt => File 12345 With 1 Spaces.txt?
I have tried to look it in help and forum, but because of my bad english I have not found or understood answer.
Maxa
Maxa
4
I don`t know if this is the right way, but I made script to add spaces:
' Maxa Insert a space where a number is before an uppercase letter.
re.Pattern = "([0-9])([A-Z])"
strNameOnly = re.Replace(strNameOnly, "$1 $2")
' Maxa Insert a space where a lowercase letter is before a number.
re.Pattern = "([a-z])([0-9])"
strNameOnly = re.Replace(strNameOnly, "$1 $2")