I have a regex which works, but unfortunately not in Java because Java does not support this type of inline modifier.
I have already read about this topic e. g. here:
My regex:
(?(?=\d{1,2}[.]\d{1,2}[.]\d{2,4})somerandomtextwhichisnotinthetext|^((($|EUR)? ?[-+]?(\d{1,8}[.,])*\d+([.,]\d+)?)|([-+]?(\d{1,8}[.,])*\d+([.,]\d+)? ?($|€|EUR)?))$)
I also tried a lookbehind but the pattern it should be matched has a variable length an this is unfortunately not supported...
The regex should me matches all of this pattern (a full match is needed --> matcher.group(0) ):
- 123.342,22
- 123,233.22
- 232,11
- 232.2
- 232.2 €
but not this:
- 06.01.99
And it needs to be implemented in Java.
But still I have no solution...
Thanks for your help!!!