Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #130: Is There an Echo in Here?

Highlighted
Alteryx Community Team
Alteryx Community Team

You have a source system that doesn't seem to be working quite as expected. The system will frequently take any given word and duplicate it within a string. You job is to clean it up! Below we have a few sample phrases that are indicative of the system's problem. Find all words that have duplicate consecutive words and reduce the duplication to a single word again!

(Advanced Users: There is a one tool solution for this!)

 

Deja Vu anyone anyone?Deja Vu anyone anyone?

 

Highlighted
11 - Bolide

Good post! Cheers!

Highlighted
17 - Castor
17 - Castor

The power in that one tool!  Even if the syntax is almost as convoluted as APL

 

APL.png

Spoiler
Solution 130.png

 

Dan

Highlighted
13 - Pulsar
Spoiler
I'm not sure how I survived before I discovered RegEx...

REGEX_Replace([Phrase], '(^|[ ])(.*) (\2)', '$1$2')

 

Highlighted
12 - Quasar
12 - Quasar

Will have to look at those one-tool solutions - Impressive!

 

For this one I had an immediate idea to solve it a certain way --- which worked!

Highlighted
16 - Nebula
16 - Nebula

Here is my 1 tool solution. 

Spoiler
Isn't it funny how we're all accomplishing the same thing but our regex expressions are slightly different and will handle new data slightly differently....

Capture.PNG
Highlighted
7 - Meteor

Learning RegEx so it's helpful to see examples of how it all works.  

 

Spoiler
REGEX_Replace([Phrase], '(^|\s)(.*) (\2)', "$1$2")
Highlighted
8 - Asteroid

Solution attached.

 

Spoiler
Always a bit of trial and error for me to make these RegEx patterns work, but I think I got it.  MP 130.jpg
Highlighted
10 - Fireball

1 tool solution...

Highlighted
8 - Asteroid

Thank you for the challenge