I am trying to use an IsMach activity with advanced option selected and the regex: “\b[O|o]
(ut|UT). \s[O|o] (f|F). \s[O|o] (ffice|FFICE)\b”
It should be able to match (OOO, ooo, Out of Office or any combination of out of office), this works fine and returns true when the input text contains such words, however, the problem is that it also returns True, for when the input is (POD Request Multiple, or POD Request Single), it should return false in this case.
Any ideas, would be much appreciated. Thank you.
You asked about the isMatch, but we do see your question more related to the Regex Pattern
Have a look here:
we enabled the Case Insensitive RegexOption and reduced the complexitiy of the pattern
This CheatSheet introduces the basic use of regex functions. With further examples also special cases are presented.
From the namespace System.Text.RegularExpressions following methods are offered:
A simple usage for example would look like this:
add System.Text.RegularExpressions to the imports:
it allows to use the shortened statement, as the namespace part can be ommited…
Regex.IsMatch(YourString, "OOO|OUT OF OFFICE", RegexOptions.IgnoreCase)
Apply the following properties to the isMatch activity to get the desired result.
Thank you this helps, but what’s wrong with this expression: “\b[O|o]
(ut|UT) . \s [O|o] (f|F) . \s [O|o] (ffice|FFICE) \b”, meaning why does it return true for (POD Request Multiple, or POD Request Single)?
Kindly note: Code snippets are better to format with the
</> from the editor as it can partly interpreted as Mark Down code
we do see unwanted matches but not on POD
In general we do feel that your initial question was answered
Forum FAQ - How to mark a post as a solution
This document is part of our beginners guide.
This article will teach you how to properly mark a post as a solution.
We were closely following our last UiPath Forum feedback round! topic and carefully extracted all the bits of feedback that was provided. As such, we would like to tackle the topic of solutions on our Forum and how to properly use them.
When is the topic resolved?
The topic can be considered resolved when the topic author has fo…
Yes the question was answered and thank you for that I just wanted to understand the issue.
Thank you for all the help. Much appreciated.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.