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. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. 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

Add punctuation in the V_Strings

maxi_reperger
5 - Atom

Hi,

 

I'v started using Alteryx a week ago and was wondering if anybody could help me solve an issue I have.

 

I'm having a large data set as "###########" and need to have it as "#.#######.###" for technical purposes.

 

Is there any way I may do this?? I tried using the Text to Columns function but couldn't do it.

 

 

Thanks !

3 REPLIES 3
NickC
Alteryx Alumni (Retired)

Hello,

 

I would suggest using the parse functionality within the RegEx tool to separate the field into 3 columns 

 

RegExOut1RegExOut2RegExOut3
###########

 

RegEx = (.)(.{6})(...)

 

Once you have these cols you can simply use the formula tool to combine them together with the additional punctuation added.

 

[RegExOut1]+'.'+[RegExOut2]+'.'+[RegExOut3]

 

 

RegEx.png

 

 

 

 

Hope this helps,

 

I'm sure there are other ways to do this purely within the formula tool.  So somebody feel free to post another solution!

 

Nick

Philip
12 - Quasar

Hi @maxi_reperger

 

You can do this with either the RegEx Tool or a Formula Tool.

 

The Formula Tool expression would be:

REGEX_Replace([Field], "(\d{1})(\d{7})(\d{3})", "$1.$2.$3")

 

The \d means find a digit. The curly brackets tell how many numbers to find. The $1.$2.$3 is for each group in the RegEx expression contained in parentheses.

 

Let me know if you have any additional problems or questions.

MarqueeCrew
20 - Arcturus
20 - Arcturus
Please try this formula:

Regex_replace([field],"(\d)(\d+)(\d{3})$",'$1.$2.$3')

Cheers,
Mark
Alteryx ACE & Top Community Contributor

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