Hi. I have a Read PDF With OCR with Text Output “pdf”. I need to get part of the string “pdf”, between a first word “RECLAMAÇÃO” and a last word “RECLAMAÇÃO”. How can i do it? Tanks!
ppr
(Peter Preuss)
March 26, 2024, 2:05pm
2
Pedro_Santos:
RECLAMAÇÃO
strPattern = "(?<=RECLAMAÇÃO)[\s\S]+(?=RECLAMAÇÃO)"
strValue = System.Text.RegularExpressions.Regex.Match(strInput, strPattern).Value
Tanks PPR!.. But returns a blank output… somethig i dont understand well?
ppr
(Peter Preuss)
March 26, 2024, 2:22pm
4
This CheatSheet introduces the basic use of regex functions. With further examples also special cases are presented.
Introduction
From the namespace System.Text.RegularExpressions following methods are offered:
Regex.Match
Regex.Matches
Regex.isMatch
Regex.Replace
Regex.Split
A simple usage for example would look like this:
[grafik]
Recommendation:
add System.Text.RegularExpressions to the imports:
[grafik]
it allows to use the shortened statement, as the namespace part can be ommited…
Currently we dont know what was modelled in detail by you. Feel free to share these details and sample text
UPD1:
we recommend to keep variable names strict NIF vs nif - upper vs lower case
ppr
(Peter Preuss)
March 26, 2024, 2:24pm
5
Also make use of the immediate panel for RnD and prototypings: