Regular expression and count functions
- 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
Good Day Everyone
I have dataset where I need to divide the input based on the numbers and alphabets and then count the occurrence of the highest number of words and create an output for them as well.
For example -
The record has a TRUE value if it consists of both alphabets and numbers. FALSE if it just has alphabets.
1 1123 PAMELA WRIGHT 2316 E 5th Ave,Denver,CO 80206-4205 - True
2 MELISSA RUFF 2753 S Milwaukee St,Denver,CO 80210-6426 - True
3 PAMELA WRIGHT E Ave,Denver,CO - False
4 PAMELA WRIGHT E Ave,Denver,CO - False
5 DANELL VALDEZ 2925 W College Ave,Denver,CO 80219-6059 - True
6 JESSICA 1234RINEHART 4BA220 W 35th Ave,Denver,CO 80212-1902 - True
7 PAMELA WRIGHT E Ave,Denver,CO - False
8 PAMELA WRIGHT E Ave,Denver,CO - False
9 DENISE 1234PENTICO 4125C S Evanston Ave Cir,Aurora,CO 80014 - True
Further more - in all these 9 records I needed to count the words and out the records with the highest number of words.
In the above data set "Ave" is repeated 9 times so all records with "Ave" need to be in one output.
I would appreciate any help in this
Regards
Abhijeet
Solved! Go to Solution.
- Labels:
- Data Investigation
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@AbhijeetChib
It seems that Alteryx is not supporting \p{P} as punctuations.
So we maybe can do something like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Edited the expected output.
1. True if there are both numbers and alphabets
2. False of there are only alphabets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@AbhijeetChib For the second part of your requirement you can use the below workflow and make the changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, but i edited the output for the first part.
TRUE - If the record consists of numbers and alphabets/words
FLASE - if the Record contains only alphabets/words
There is no specific pattern to the , its just random text that i need to categorize and filter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@AbhijeetChib use the below regex formula for your edited input
