I don’t know if it was a problem copying and pasting, but after "TOTAL" has some spaces, and before the number has a >
. If that’s it, just put \n
will not help. An alternative is to use:
TOTAL\s+>\d{1,3}(?:\.\d{3})*,\d{2}\s+DEDU.*?ES
Instead of \n
, I use the shortcut \s
, that already includes spaces and line breaks. I also use the quantifier +
, meaning "one or more occurrences". That is, you can have multiple line breaks and spaces after "TOTAL".
Then it has its own character >
, and then the part corresponding to the numerical value.
I don’t know if the software you’re using supports capture groups. If you have, just put the passage corresponding to the numbers in parentheses:
TOTAL\s+>(\d{1,3}(?:\.\d{3})*,\d{2})\s+DEDU.*?ES
Thus, the value will be available in the first capture group (see for example in regex101.com, on the right side appears "Group 1" with only the value you need).
If you don’t have the >
before the value, just remove it from the regex:
TOTAL\s+(\d{1,3}(?:\.\d{3})*,\d{2})\s+DEDU.*?ES
Using Regex software and did not give :( ... Software: Regular Expression Designer.
– user2254936
@user2254936 The text is exactly as it is on the question? (with spaces after "TOTAL" and
>
before the value? ) If you don’t have the>
, simply remove it from regex, for example. I tested it here with the free version of Regular Expression Designer and it worked– hkotsubo
has no space after TOTAL and has no > before value.
– user2254936
@user2254936 Then just take the
>
of regex:TOTAL\s+(\d{1,3}(?:\.\d{3})*,\d{2})\s+DEDU.*?ES
(updated the response with this option)– hkotsubo
really, taking out > worked .... was worth too !
– user2254936