This is my string: 50.00.00..00.00
I want to match all .
except the last one, so after a replace I end up with 50000000.00
Can somebody help me with this?
See Question&Answers more detail:osThis is my string: 50.00.00..00.00
I want to match all .
except the last one, so after a replace I end up with 50000000.00
Can somebody help me with this?
See Question&Answers more detail:os.(?=.*.)
Matches a dot (.
), which there must be another dot following it ((?=.*.)
).
(This assumes the regex engine supports lookahead, e.g. PCRE, Python, etc.)