community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More
SOLVED

Check for same repeated characters

Highlighted
Asteroid

I was wondering if anyone got any ideas of how can i check for the same repeated characters in a field.

 

For example

 

If the field (Addline) does contain any same repeat of characters eg AAAAA or /// which has been repeated more than 3 times?

 

 

 

 

Alteryx Certified Partner
Alteryx Certified Partner

Ok @AndrewCrayford.  So you want to start my day off with a challenge.  I can appreciate that.

 

REGEX_match([addline], ".*(.)\1{2,}.*")

This pattern will look for any character within a string that is found 3 consecutive times or more.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Asteroid

Thanks for the quick reply @MarqueeCrew

 

I guess if it returns a -1 then it found a character 3 or more times otherwise it returns an 0 is that correct?

Alteryx Certified Partner
Alteryx Certified Partner

I would define the new field as BOOL then you'll see True and False.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Asteroid

Cool, many thanks

Labels