I would like to match following bold marked numbers in a Text with numbers and text.
some text 12.444 12,444 12'444 123.122 12.1234 12345 1234 12.12 12.1234567 12.242Text 12.242 Text Text12.242 Text12.242Text
Numbers with a dotlike seperators should only have 3 following digits. If number has more digits it should be ignored. The Number should be matched as a whole. 12.34567 should not match to 34567.
The Numbers should match as a whole so I could later match "from 12.123 to 56.789" with 2 groups group1 : 12.123 group2 : 56.786
I started with following regex which did not match the needs:
[?<!\d][0-9]{1,2}[,|\.][0-9]{3}[?!\d]