I am trying to make column A to column B.
Hi @Cheshta22
Take a look at the solutions here -> https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/split-by-upper-case-before-lower-case/td-p/596042
If you explicitly want to use Regex, the link has a good solution by @Jonathan-Sherman using the following two formula:
REGEX_Replace([Field1],"([A-Z])([a-z])"," $1"+"$2",0) TRIM(REGEX_Replace([Field1],"([a-z])([A-Z])","$1 "+"$2",0))
The first handles any word that starts with an upper case letter which is preceded by a lower case letter, and replaces it with a space and the upper case letter, then the lower case letter.
The second handles the instances of multiple upper case letters by looking for a lower case letter preceded by an uppercase letter, and replaces it with the lower case letter and a space, then the upper case letters
Note: the 0 at the end denotes that the case must match
@Cheshta22 Try
REGEX_Replace([YourField], "(?<!^)([A-Z])", " $1",0)
@Cheshta22 @Updated regex
REGEX_Replace([YourField], "(?<!^)([A-Z]+)", " $1",0)
Thank you
Hi, @Cheshta22
FYI.
REGEX_Replace([Txt], '(?<=[a-z])([A-Z])', ' $1', 0)