Find better option for regex

I have the following text, as positive amounts

GASTOS DE ENVÍO 1,00 3,97 3,97 PAGOS ( 33,76 ) 06-04-2021 Domiciliación: 33,76 PAGADO Base Imp. % IVA Cuota IVA % RE Cuota RE TOTAL 27,90 21,00 5,86 5,20 0,00 33,76

and I have the following regex that captures the amount (36,76)

my problem is that if that number changes to negative, my regex does not capture anything

-7,44 3 DIFERENCIA TARIFA 1,00 2,00 2,00 PAGOS ( -506,47 ) 11-04-2021 Domiciliación: -506,47 PAGADO Base Imp. % IVA Cuota IVA % RE Cuota RE TOTAL -418,57 21,00 -87,90 5,20 0,00 -506,47

in this case I need to capture 506.47

Thanks

@RPASOFT
Does it mean you need value in between Domiciliación: PAGADO this text?

In principle yes, it would be the number after “domiciliacion”

@RPASOFT

Check if below expression helps you

(?<=Domiciliación:)(.*)(?=PAGADO\b)

If PAGADO is not fix then try this

(?<=Domiciliación:)(\d|[-,.\s]){0,10}

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