Alteryx Designer Discussions

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

Regex_replace help

6 - Meteoroid

Tried and read everything but still have some issue...


original string:  


need to be:



Regex_Replace([ARRAY], "[~D]d+[D]",null())



Look like the number between '60400' ~D and ^D is not being replace.

Please help


11 - Bolide

Hi @truct-kp ,



Regex_Replace([ARRAY], "[~D]d.+[D]","")


Hope this helps.

6 - Meteoroid

Nope, I tried that before.  I even put \ before my special character, but it not working


11 - Bolide

Strange, it's working when I test it,, alternative is


 Regex_Replace([ARRAY], "~D.+D","") ?

11 - Bolide


6 - Meteoroid

your suggest solution is very straightforward and I had try them and other variation as well.  

All attempts are not working.  very weird.  

Will open a case with support.


11 - Bolide

If you can, post your workflow or data extract - your data might have some end spaces or newlines etc not copying across on your original post.

6 - Meteoroid

Give it a shot.


Thank you

11 - Bolide

You have not removed the null condition from your RegEx, it is showing as: Regex_Replace([CVRG_ARRAY_TX_CHOICE],"~D.+D",null())




Regex_Replace([CVRG_ARRAY_TX_CHOICE], "~D.+D","")


The null() is replaced by ""








6 - Meteoroid

Sorry, please try this package