I have a strings:
AddData
TestSomething
TellMeWhoYouAre
and so on. I want to add space before uppercase letters. How can I do it?
|
I have a strings:
and so on. I want to add space before uppercase letters. How can I do it? |
||||
|
Using
The substitution will look for an upper-case letter immediately following a another non-whitespace character, and insert a space in-between the two. For strings with more than one consecutive upper-case character, like
|
|||||||||||||||||||||
|
|
Perl, using lookbehind and lookahead zero-width regular expressions:
This version is also separating consecutive uppercase letters. |
||||
|
|
Add space between a letter that is not an upper-case letter and a letter that is an upper-case letter |
|||||||||
|
IClimbALadder– glenn jackman 16 hours agoReadFileFromCDDriveand @Kusalananda 's solution works great. – HeroFromEarth 1 hour ago