Identifying repeating digits
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I need to clean up phone numbers and I randomly find phone numbers made of the same repeating digit such as "11111111" or "33333333" and the repeating pattern never has the same number of digits, and the digit could go from 1 to 9.
I'd like to check the thousands of rows of the file and to identify all the rows having this pattern.
Do you know how I could do that?
thank you very much
Solved! Go to Solution.
- Labels:
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Esmeralda_In_Paris, the Community might be able to better help if you can provide us some sample data to help us better understand the problem statement. Could you share about 2-3 rows of data? In any case, I suspect the REGEX tool is going to be the go-to tool for this sort of problem.
Most Alteryx users attempt to construct/test their regex expression using some form of online regex editor (e.g. https://regex101.com/) and then use them within the Regex tool in Alteryx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
record id. regex tokenize (.) split to rows. summarize tool group by record id - count distinct mode. filter out entries where count distinct = 1. Those are the entries with 1 repeating value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Regex Tool > Match with expression
(\d)\1*
will be true for numbers (of any length) that are all the same digit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thank you so much! It works perfectly
