Regex Match issue
- 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 everyone,
I am trying to formulate the proper expression for the following condition:
The cell value should consisit of the combination: 2 capital letters ([A-Z]), 9 alphanumeric values (\w) and 1 digit (\d)
An example of the allowed cell value would be 'GB1w87p30f40'.
I tried a few variations of the expression I thought would work but I can't seem to put it together properly.
Would appreciate it if somebody could help me out here.
Thanks in advance!
Solved! Go to Solution.
- Labels:
- Expression
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please provide relevant data to this use case, and kindly provide your criteria in as much detail as possible. If you have a workflow built halfway, kindly export that over as well.
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Cela,
This should work: ^[A-Z]{2}\w{9}\d$
 
FYI, ChatGPT is very good for such straight-forward Regex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Nevermind... did some random data here:
^[A-Z]{2}\w{9}\d$
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@caltang Thanks for the quick response! I am basically checking the cell values of a specific column to see if the condition is met. This checkup happens in inside the Table tool by editing the column rule for the specific column. If the condition is not met, I want to turn the background color crimson, else it shall turn green.
My issue doesn't lie with the entire expression but with the format of the condition itself:
If !REGEX_Match([Field1], >MISSING EXPRESSION HERE<) then "background-color: crimson" else "background-color: green" endif
Hope it helps to clarify what I meant initially!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Perfect, thanks guys!
