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

Remove all 2 character "words" in a cell

taxhead
6 - Meteoroid

Hi,

 

tried already several ideas but my knowledge with Regex_Replace is limited.

 

I have a dataset with various columns. The "Name" column includes e.g. the full name of a bank (e.g. Branch of the Bank of Russia). I want to remove all this 2 character words (in this case "of"). Additionally, my data consists of a lot of cyrillic entries which makes it even more complicated. I don't know how to created the Regex_Replace formula or is there an other way for this problem?

 

Thanks in advance 

11 REPLIES 11
MarqueeCrew
20 - Arcturus
20 - Arcturus

@taxhead ,

 

 

 

REGEX_Replace([Field1], "\b\w\w\b", '')

 

 

 

This formula will do it all for you.  

 

Replace what is a word boundary followed by 2 word  [A-Za-z0-9_]  characters followed by a word boundary with nothing.

 

If you want any character use "\b..\b"  it will include non-latin.

 

BTW:  

 

[^\u0000-\u007F]+

That is all non-Latin characters.

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
taxhead
6 - Meteoroid

Thanks, this worked very well! 

Labels
Top Solution Authors