Regex, extraction problem

@joseantonio - Here you go…

835,80 - Link
21,00 - Link
175,52- Link
0,00 - Link
0,00 - Link
1.011,32 - Link - (Assumtion on this pattern: there will be always a date before this field, if not it won’t work)

Hope this helps…Let me know, if it didn’t work any other texts(same pattern)…I will happy to assist…

Thanks to your help, I have finally found why this document gives me errors, maybe you know a solution to this, I explain

If you look at text one after “Total Amount:” only “EUR” appears, while in text 2, an amount appears in the same place,

My question is, following the regex expressions that you attach to me, how can we adapt those regex expressions to this problem?

text1:

Base Imponible +LPI IVA Cuota IVA Recargo Cuota Recargo Importe Total: EUR 835,80 21,00 175,52 0,00 0,00 Forma de pago: RECIBO DOMICILIADO A 20 D-B2B Vencimientos: 06/04/2021 1.011,32 EUR

text 2

Base Imponible +LPI IVA Cuota IVA Recargo Cuota Recargo Importe Total: 261,92 EUR 216,46 21,00 45,46 0,00 0,00 Forma de pago: RECIBO DOMICILIADO A 20 D-B2B Vencimientos: 05/04/2021 261,92 EUR

Thanks for all

@joseantonio - So in the first case, you have to extract 835,80 and in the second 261,92??

if yes, here is how you can try…

Hope this helps…

Question: In the first text, you have only 5 set of amounts, whereas in 2nd you have 6…i am not sure, how you are mapping…

I need to omit in the regex expressions the amount that comes out after the total amount: so these expressions would be valid for both cases

because in the first text an amount appears at the beginning that I want to omit, I really don’t know if I explain myself? I would like to omit the amount between the “Importe total:” and "EUR "and after that omission it should work or the amount does not appear

I think i got it…you want to capture only after EUR…5 amounts…

I have adjusted the Regex patterns and updated the links below…

835,80 - Link
21,00 - Link
175,52- Link
0,00 - Link
0,00 - Link
1.011,32 - Link - Same as above…

I have tested the above pattern including your second text…it works on both…

It is perfect, it works correctly, thank you very much, I have more doubts about this but I will open other posts

1 Like

@joseantonio - Glad it worked…

If it relates to the same topic(ie same extraction problem), you can ask here…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.