In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Splitting a Column

kdelisi002
7 - Meteor

I have a Column called Series and in that column there is two names, Trading [FPTS], and Trading [FPTG). I'm trying to get just the FPTS and FPTG into that column so I can join it with another set of data. Everytime I use text to columns and I can't get rid of the [ , ], ). Any ideas would be greatly appreciated.

4 REPLIES 4
jdunkerley79
ACE Emeritus
ACE Emeritus

try the following formula:

Regex_replace([Series], "Trading [\[\(](.*?)[\]\)]", "$1")

Output should be FPTS or FPTG 

kdelisi002
7 - Meteor

That worked for one but no the other. I wrote the question wrong one is Trading and the other is Trading1 sorry.

BenMoss
ACE Emeritus
ACE Emeritus
Could you just use the regex tool in parse mlde to identify a sequence of four consecutive uppercase letters.

Something like...

(\u{4})

Should work.

Ben
jdunkerley79
ACE Emeritus
ACE Emeritus

 A looser expression would be:

Regex_replace([Series], ".*?[\[\(](.*?)[\]\)].*", "$1")

This will match text between brackets and extract that

 

To explain the Regex:

- .*? is a non greedy capture upto a [ or ( bracket '[\[\(]

- Next it captures again non greedy until the next ] or) into $1

- Finally matches rest of like 

 

Labels
Top Solution Authors