Regex_match
- 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
Need a quick simple regex_match solution
- E
- L,D,D
- H
- A,A,A,A,A,A,A,A
need 2 and 3 to be "False" and 1 and 4 to be "True". Having some issue with the ","
if REGEX_Match([TEST],'A-D') then "True" else "False" endif
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Could you please give us more details on what your desired output is?
Do you need to flag records that contain only letters from A to D? Is that what you need?
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Contains([test],"A") OR
Contains([test],"B") OR
Contains([test],"C") OR
Contains([test],"D")
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This one will match your criteria
if REGEX_Match([TEST],'.*[A-D].*') then "True" else "False" endif
This is an interesting case. It appears that regex_match and regex_replace act in slightly different ways. Here's the test I set up
First formula is the original. The second, a replace using the same regex as the first. The 3rd one expands the expression to match the entire field.
And here are the results
If appears that Regex_Match has to match the entire field in order to return true, whereas Regex_replace acts on any part of the field.
Dan
