Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Regex problem

MostafaBouzari
8 - Asteroid

Hello guys,

I'm trying to get the information from a string like this 

 

 

Nutella 01_2017
Nutella01_2017

 

 

using Regex tool and output mode Parse with this Regular Expression 

 

 

([\0-9\_]*)|([A-Za-z]*)

 

and also This one 

(\d+\_\d+)|([A-Za-z]+)

 but i can't get the good resualt  

How can i achieve this?

(The Space between nutella and the date was deleted by a Cleansing tool which can get ignored)

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus

@MostafaBouzari ,

 

Please try using a formula like:

(\l+)\s*(\d.*)

It will find letters followed by 0 or more spaces followed by a digit followed by anything.

 

capture.png

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MostafaBouzari
8 - Asteroid

thank's for your help I use this Website  to check if my regex works and there is a Language selection option which language should i use (e.g : PHP,Python,Java Script)?

 

Or if you have a better website or tool to share with us please let us know 

 

Regards

MarqueeCrew
20 - Arcturus
20 - Arcturus

i do like regex101.com.  there is also regexr.com.  i do like playing with regex simply using the formula tool too.

 

cheers,

 

Mark

Alteryx ACE & Top Community Contributor

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