marcchn Posted March 25, 2012 Posted March 25, 2012 I need to import a file that has a field in which the individual words in a name have been combined into one word (i.e. SmithRooftopBuilding). I need a calculation that would separate the words at each capital letter so that it would read "Smith Rooftop Building". I assume the easiest way to do this would be to write a calculation that inserts a space before each 2nd capital letter in a text string. However, I'm having a hard time doing it. Any help would be appreciated.
comment Posted March 25, 2012 Posted March 25, 2012 You could substitute every upper-case character with itself preceded by a space, then trim the result.
Lee Smith Posted March 25, 2012 Posted March 25, 2012 Trim ( Substitute ( Tips::Raw ; [ "A" ; " A" ] ; [ "B" ; " B" ] ; [ "C" ; " C" ] ; [ "D" ; " D" ] ; [ "E" ; " E" ] ; [ "F" ; " F" ] ; [ "G" ; " G" ] ; [ "H" ; " H"] ; [ "I" ; " I" ] ; [ "J" ; " J" ] ; [ "K" ; " K" ] ; [ "L" ; " L" ] ; [ "M" ; " M" ] ; [ "N" ; " N" ] ; [ "O" ; " O" ] ; [ "P" ; " P" ] ; [ "Q" ; " Q" ] ; [ "R" ; " R" ] ; [ "S" ; " S" ] ; [ "T" ; " T" ] ; [ "U" ; " U" ] ; [ "V" ; " V" ] ; [ "W" ; " W" ] ; [ "X" ; " X" ]; [ "Y" ; " Y" ] ; [ "Z" ; " Z" ] ) )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now