Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

regex match special characters

EtamSoko
8 - Asteroid

hi everyone,

 

I need a little help with cleaning my dataset. I have a regex already for my exercise but it isn't covering everything.

 

I need to replace characters in a field itself if it has only:

 

*

-

---

--

-

..

.

/

blank

empty

0

 

Is it possible to have all this in 1 expression? for now I have "^(\W)$" for now which replaces some of them but not obviously all the above.

Can someone let me know if that is possible at all?

 

I would also look for an option to create a macro and spread across my org to kind of use it to any dataset going forward.

 

thanks,

M

 

 

6 REPLIES 6
RishiK
Alteryx
Alteryx

@EtamSoko it is a personal preference and maybe easier to understand.  Use the Formula tool and the replace functions such as the one below:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Replacing-characters-within-a-data-fie...

Qiu
21 - Polaris
21 - Polaris

@EtamSoko 
Or prepare a library of these special characters and use Find and Replace tool?

Easy for maintenance also.

 

EtamSoko
8 - Asteroid

@Qiu 

 

That sounds good!

How do I get to create the library? Can you help me out there with an example? I do not have experience on that.

 

thanks a lot!

M

afv2688
16 - Nebula
16 - Nebula

Hello @EtamSoko,

 

I don't know it this is exaclty the idea but hope it helps to suit your needs 🙂

 

Regards

Qiu
21 - Polaris
21 - Polaris

@EtamSoko 

Thanks  to @afv2688 , this is exactly what I meant.😁

EtamSoko
8 - Asteroid

ok. I thought there is another more sophisticated way for library 🙂 thanks all of you for the help. Library solution will be the way forward.

 

cheers,

M

Labels