Stack Exchange
Total excl/incl from string using regexp
I've been reading this post Return only one group with OR condition in Regex to get an understanding how to get only one group in match. Somehow that does not work on my pattern.
Here is the used string:
Ledigingen 4 lediging € 32,48 € 50,92 21,00 %
van 01-01-2019 t/m 31-01-2019
Huur 1 Maand € 8,63 € 8,63 21,00 %
toeslag over € 50,42 (21% BTW) € 2,76 21,00 %
(WHITESPACE) Totaal exclusief BTW € 50,18 
BTW hoog (21%) € 50,18 € 50,89 
totaal inclusief BTW € 70,07

Currently it extracts each occurence of amount. Is there a way to get only values followed by [Tt]otaa?l excl/incl BTW?
I guess I've been using positive/negative lookahead wrong. 
Desired output from the given input is:
€ 50,18
€ 70,07

DEMO
RegEx
(?!<=[tT]otaa?l\s*?.*?)([€$]\s*\d+(?:[,.]\d{0,2})?)


Did you read the regex explanation at regex101?

Is this OK

@Toto I am looking for a way to extract only values with this mask €$ dd.dd. And the pattern should be stable in case string has only i.e. totaal incl/totaal excl with or without BTW . I added ([A-Z]{3})*? in your pattern for cases when there is no BTW. But how to get only amount now? https://regex101.com/r/PuGrqn/11

With this one, the amount is found in group 1

Are you using python or another language?

Single use of regex, is there a way to extract get only 1st group values? Like for instance here https://regex101.com/r/PuGrqn/16

If you can use PCRE regex flavour, here is a way

nice one, although uipath(tool that i use) does not support PCRE, is there any workaround here?

If you are using UIPath as you mentioned in the comments, you could use:
(?<=\b[Tt]otaa?l\s+(?:ex|in)cl[^€$]*)[€$]\s*\d+(?:[,.]\d{1,2})?\b

The pattern matches:

(?<= Positive lookbehind, assert that to the left is

\b[Tt]otaa?l\s+(?:ex|in)cl Match the word totaal or Totaal followed by excl or incl
[^€$]* Match optional chars other than € or $


) Close the lookbehind assertion
[€$] Match one of € or $
\s* Match optional whitespace chars
\d+(?:[,.]\d{1,2})? Match 1+ digits with an optional decimal part
\b A word boundary to prevent a partial word match

See a .NET regex demo
To also match the  inclusief BTW  or  exclusief BTW  part, a more specific regex could be:
(?<=\b[Tt]otaa?l\s+(?:ex|in)clusief\s+BTW\s+)[€$]\s*\d+(?:[,.]\d{1,2})?\b

See another .NET regex demo
