ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

Regex Help - how to split the string with numbers and special characters into columns

cici0608
5 - Atom

Hello,

 

I have a column looks like "[A-BCD] 1234.05 - /EFG-HIJK.LMN - OPQ (RST) UVW - [XYZ] - ABC

 

I would like to split the string into 3 columns - 1234, 05, and [XYZ] from above column. 

 

Could you please help?

 

Thank you! 

MarqueeCrew
19 - Altair
19 - Altair

@cici0608 ,

 

I've invited you to a private ZOOM to review your needs and help you.

 

Cheers,


Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Please Subscribe to my youTube channel.
echuong1
Alteryx
Alteryx

Try this: .+(\d{4})\.(\d{2}).+(\[\u{3}\])

 

echuong1_0-1615491690091.png

 

MarqueeCrew
19 - Altair
19 - Altair

@cici0608  (Crystal)

 

Here is our formula:

 

.*(\b\d{4})\.(\d\d).*\[(.*)\].*

 

Used in a RegEx tool (configure to PARSE), you immediately get your desired fields:

 

capture.png

The helper web page for learning RegEx that I recommended:  https://regex101.com/ 

 

My YouTube for RegEx beginners is here:

 

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Please Subscribe to my youTube channel.
Labels