This is my string: 50.00.00..00.00
50.00.00..00.00
I want to match all . except the last one, so after a replace I end up with 50000000.00
.
50000000.00
Can somebody help me with this?
.(?=.*.)
Matches a dot (.), which there must be another dot following it ((?=.*.)).
(?=.*.)
(This assumes the regex engine supports lookahead, e.g. PCRE, Python, etc.)
1.4m articles
1.4m replys
5 comments
57.0k users