I have a couple of issues in Power Automate Desktop using regex (even after confirmation in regex101). In the parsed text below you can see the following information:
500 (Quantidade/Quantity)
9.999,99 (Valor/Value)
IVA (S4) 0,0 % (IVA/Tax)
I.B.A.N. AB11 1111 2222 3333 4444 5555
Pos. Material Nº Quantidade Preço Unidade de Valor
Material medida EUR
_______________________________________________________________________
11 1234567890123 500 KG 1,11 EUR 1 KG 9.999,99
AAAAA AAA 111/11
AA
AAAAA AAAAAA-11AA
_______________________________________________________________________
Total: 9.999,99
IVA (S4) 0,0 %
AAAAA AAAAAA
AAAAA AAAAAA
AAAAA AAAAAA
AAAAA AAAAAA
AAAAA AAAAAA
AAAAA AAAAAA
AAAAA AAAAAA
TEL.: +11 11 111 11 11 I.B.A.N. AB11 1111 2222 3333 4444 5555 AA AAAAAAAAA AA 11/11/11
the regex I used for Quantidade is this:
(?<=Pos. Material Nº Quantidade Preço Unidade de Valor
Material medida EUR
_______________________________________________________________________\r?\n\d+\s\d+\s)\d+
it gives me the intended result: 500
the regex I used for Valor is this:
(?<=Pos. Material Nº Quantidade Preço Unidade de Valor
Material medida EUR
_______________________________________________________________________\r?\n\d+\s\d+\s\d+\s\w+\s\d,\d+\s\w+\s\d+\s\w+\s)\d+\.\d+,\d+
it gives me the intended result: 9.999,99
however Power Automate can't handle multiple lines and the regex gets displayed in a single line in the data table and therefore doesn't produce any results. this happens for both cases above:
Question: Can you help me edit these regex so that they are shorter and readable in a single line?
the regex I used for IVA is this:
(?<=IVA\s\(\w+\)\s)\d+\,\d+\s\%
it gives me the intended result: 0,0 % however in Power Automate this regex gets automatically altered into this:
and doesn't produce any result. I've altered it and it continues to revert into that despite any alterations that I make.
Question: Can you help me edit this regex so that I get the intended result?
this is the regex I used to get the IBAN:
(?<=I\.B\.A\.N\.\s)(\w{2}\d{2}\s\d{4}\s\d{4}\s\d{4}\s\d{4}\s\d{4})
it works and gets me the intended result, my question is related to the actual expression. is there a better way to deal with the repetition? I'm referring to the 5 x \s\d{4} in the expression
Apologies for the lengthy question and thanks in advance for any assistance.