How to replace second last character of the string?

Hi there,I need to replace the second last character “.” with “,”.
1234.5 → 1234,5 like this.
do you have an idea?
Any help would be greatly appreciated

Hi @Zehra

Use

StrText.ToString.Replace(“.” ,“,”)

Thanks
Ashwin S

hi @AshwinS2 think string like 123.432.5 so there is 2 “.” .I just want to change second last character.

Hi @Zehra

USe regex and give the pattern as (?<=432) and then replace “.” with , with the above syntax

Thanks
Ashwin S

many thanks @AshwinS2

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.