Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need to count words and put /

mmustkee
10 - Fireball

Hi Team,

 

I have data in which we need to place "/" after each 3 letter.  We have "/" in many of the field but sometimes it is 6 letters together without "/". Please refer table below

 

DateResult
ssn/ssd/fdcdcf/cdf/klnsdnssn/ssd/fdc/dcf/cdf/kln/sdn
ssn/ssd/fdcdcf/cdf/kln/dfcssn/ssd/fdc/dcf/cdf/kln/dfc
ssd/dfrsdr/dsrssd/dfr/sdr/dsr
dfrssn/sdf/dfrtgy/klydfr/ssn/sdf/dfr/tgy/kly
3 REPLIES 3
FrederikE
13 - Pulsar

Hey @mmustkee,

 

You can achive this using RegEx in a Formula tool:

 

REGEX_Replace(Replace([Date], "/", ""), "(...)", "$1/")

 

See the attached WF. 

 

mmustkee
10 - Fireball

@FrederikE 

 

Thanks for your solution.

We can not replace "/" with "" as  we have huge data and sometimes we have incorrect data. so only thing I want is to place "/" where ever we have 6 letters together without space and without "/"

FrederikE
13 - Pulsar

Hey @mmustkee,

 

Alright. Then

 

REGEX_Replace([Date], "(\w{3})(\w{3})", "$1/$2")

 

This should do :) 

Labels
Top Solution Authors