mce
(Maic Ceriani)
February 6, 2023, 2:04pm
1
Hi, I obtain the below error message
when I try that the system write the number retrieve by the regex expression.
This is my regex expression:
And it retrieves the correct number now:
In the below example its 40121
I want now to use a write line activity in order the system write the number (40121) in the output but I obtain that error message.
Anil_G
(Anil Gorthi)
February 6, 2023, 2:09pm
2
@mce
As per error it says that the value is either not retrived or no match is found or the variable itself is not given in the matches expression activity
Cheers
mce
(Maic Ceriani)
February 6, 2023, 2:23pm
3
strange the value seems retrieved (see below )
Do you have another idea ?
Hi @mce ,
Could you double check if you are assigning the output variable to the Matches
Activity ? Also, Do Check if there are duplicate variables used in the variables Panel.
ppr
(Peter Preuss)
February 6, 2023, 2:33pm
5
we would suggest to work with the debugging panels, preferred with the immediate panel. You can prototype and check directly:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum
Anil_G
(Anil Gorthi)
February 6, 2023, 3:52pm
6
@mce
As suggested please check the debugging panel…and in matches properties you have regex options try using single line or multiline option
Cheers
mce
(Maic Ceriani)
February 6, 2023, 3:56pm
7
Yes I did
and there is no duplicated variable
mce
(Maic Ceriani)
February 6, 2023, 4:02pm
8
in multi line option:
and single line option:
the same issue. It seems that the result is not recognized, strange
mce:
Do you have another idea
@mce , Could you try replacing the \n
in the regex expression you’re using with the below and let us know if that works :
\r?\n
rikulsilva
(Henrique Lima da Silva)
February 6, 2023, 8:22pm
10
@mce
Try change \n in regex to \s.
\s is a shorthand to [ \t\r\n\f]
Also, as mentioned before, use imediate pane to debug your expression
Hi
You might want use an If statement to check you received a result or use a Regex.IsMatch before trying to extract a result.
Could you paste your sample text in a reply?
Give a try on the following regex pattern.
(?<=Dependent care benefits[\r\n\s]+)[\d]+
Preview it here
Hopefully this helps,
Cheers
Steve
system
(system)
Closed
February 9, 2023, 8:35pm
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.