Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.8K Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Inserting spaces between specific pairs of letter characters?

Posted 4 years ago
POSTED BY: Gregory Lypny
5 Replies
Posted 4 years ago

Good stuff. Thanks. I'll have to do my homework on RegEx so that I can switch between Wolfram functions and RegEx.

POSTED BY: Gregory Lypny
Posted 4 years ago

Another alternative:

StringReplace["OnTopOfTheWorld", RegularExpression["([a-z])([A-Z])"] -> "$1 $2"]
POSTED BY: Eric Rimbey
Posted 4 years ago

That certainly works. Thanks!

POSTED BY: Gregory Lypny
Posted 4 years ago
POSTED BY: Rohit Namjoshi
Posted 4 years ago

That certainly works. Thanks! And in StringReplace, can be written as

StringReplace["OnTopOfTheWorld", 
 lowerCaseChar : CharacterRange["a", "z"] ~~ 
   upperCaseChar : CharacterRange["A", "Z"] -> 
  lowerCaseChar ~~ " " ~~ upperCaseChar]
POSTED BY: Gregory Lypny
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard