SOLVED
Issues with Regex Match
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
mystasz
8 - Asteroid
‎10-14-2022
11:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have the below text input:
With this formula......
I expect it to look like this:
But instead, I'm getting this:
Any idea what I may be doing wrong? Thanks in advance.
Solved! Go to Solution.
Labels:
- Labels:
- Common Use Cases
- Regex
4 REPLIES 4
20 - Arcturus
‎10-14-2022
11:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@mystasz ,
I took a slightly different approach with this:
IF
(Contains([Record ID],"EAP") OR
Contains([Record ID],"RTR") OR
Contains([Record ID],"LPP")) AND
(Contains([Record ID],"LQL") OR
Contains([Record ID],"PRP"))
THEN "Level 1, Level 2"
ELSEIF
Contains([Record ID],"EAP") OR
Contains([Record ID],"RTR") OR
Contains([Record ID],"LPP")
THEN "Level 1"
ELSEIF
Contains([Record ID],"LQL") OR
Contains([Record ID],"PRP")
THEN "Level 2"
ELSE Null()
ENDIF
Cheers,
Mark
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Matthew
11 - Bolide
‎10-14-2022
11:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
this should work, you just need to add some wildcards to your pattern:
REGEX_Match([Record ID], '.*EAP.*|.*RTR.*|.*LPP.*')
MilindG
12 - Quasar
‎10-14-2022
11:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎10-14-2022
12:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you all for solutions!! @Matthew 's solution worked best for me as my actual dataset has about 200+ different record IDs. It was easier to concat with the .*? and plug into the formula.
