I’m new to UiPath and regex.
I need to use a regex to find this number, I wanted to get it by findind whatever is between the two phrases (the text is loaded from PDF).
Quantidade Valor Valor do Documento
5.318,64
INSTRUÇÕES DE RESPONSABILIDADE DO BENEFICIÁRIO. QUALQUER DÚVIDA SOBRE ESTE BOLETO, CONTATE O BENEFICIÁRIO
If anyone can help me I’d really apreciate it.
@Gabriel_Wisniewski - Is the “Quantidade Valor Valor do Documento” and/or “INSTRUÇÕES DE RESPONSABILIDADE” always remains same?? if yes then we can fetch the #
Like this…
Or like this…
1 Like
prasath_S
(prasath S)
April 6, 2021, 3:07pm
3
Hi @Gabriel_Wisniewski
First use matches activity give your input and pattern as Documento\s*[\d .,]\s INSTRUÇÕES
In second matches activity give pattern as “[\d .,]*”
First Regex pattern
1 Like
Sorry guys, I checked the output of the Read PDF Text activity and I realised it was different from how I originally selected it (dumb mistake)
Valor do Documento
00 R$ 5.318,64
INSTRUÇÕES DE RESPONSABILIDADE DO BENEFICIÁRIO.
This is how the text is now, and the “$” character is making it difficult for me to write the regex now.
prasath_S
(prasath S)
April 6, 2021, 4:56pm
5
Hi @Gabriel_Wisniewski
As said earlier use this in the first match activity Documento[\w$\d\s .,]*INSTRUÇÕES
In the second Match activity use [\d .,]*
1 Like
The only value that I need to get is the R$ 5.318,64 part
Please try this pattern…
or if you want R$ 5.318,64
1 Like
Please find the starter help here…
StrMatches is of variable type MatchCollection
Here StrInput is
1 Like
I really don’t get what I’m doing wrong
@Gabriel_Wisniewski - Please check this Link…You have choose ECMA Script on Regex101 website…
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
Link for RegexTestter…
Note: Personally I prefer/use mostly RegexTester which is Nice for testing regular expressions in .NET (which is what UiPath is using)
1 Like
Thank you, I can only assume I was typing it wrong all this time.
system
(system)
Closed
April 9, 2021, 5:46pm
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.