Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Regex ,split

Nandy
8 - Asteroid

Hi Guys,

 

i have a scenario where i have a string like BB(SPACE)(SPACE)R(SPACE)DD(SPACE)(SPACE)A.

 

I need output as BB  R,DD  A.  That is always 5 characters & 5 characters include space sometimes or may not have spaces like WBBBCDEEES as WBBBC , DEEES.

 

which regex function would satisfy both?

 

Thanks,

Nandy

 

 

19 REPLIES 19
Nandy
8 - Asteroid

Hi@clarke,

 

it works , but I need more than two columns i.e split and put in as many columns it needs. 

 I tried the same using Tokenize but it threw an error.

Nandy_0-1580899146292.png

afv2688
16 - Nebula
16 - Nebula

Hello @Nandy,

 

This will always start with a letter now

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Nandy
8 - Asteroid

Sorry ignore the attachment.  i have attached the right one.

 

Thanks a lot for helping me.

afv2688
16 - Nebula
16 - Nebula

Hello @Nandy,

 

As far as I can see, my formula is giving the correct results.

 

Untitled.png

 

Do you want them to be in the same column?

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Nandy
8 - Asteroid

Thanks Yeah it works 🙂

Nandy
8 - Asteroid

 

HI Marq,

 

([[:alpha:]].{4})-- Could you explain the function , this works actually.

 

Thanks

afv2688
16 - Nebula
16 - Nebula

Hello @Nandy,

 

What this function does is parse the data from 5 in 5 characters always taking a letter as the first one, if there is none (like a space) it gets skipped and goes for the next one.

 

Regards

Nandy
8 - Asteroid

Hi ,

 

what if it starts with number , sometimes data is like that as well. Will it still work

 

Thanks,

Nandy

afv2688
16 - Nebula
16 - Nebula

Hello @Nandy,

 

Then change it tho this:

 

([[:alpha:]].{4}|\d.{4})

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Nandy
8 - Asteroid

Thanks a lot .

 

It worked .

 

Thanks,

Nandy

Labels