I have a XML file and in it there are prices defined for different items as follows..
<property>
<propertyid>AAA</propertyid>
<price>8.725</price>
<discount>0</discount>
</property>
<property>
<propertyid>BBB</propertyid>
<price>4.135</price>
<discount>0</discount>
</property>
But I want to remove the dot(.) in all of the prices..
eg : new XML string should be as follows..
<property>
<propertyid>AAA</propertyid>
<price>8725</price>
<discount>0</discount>
</property>
<property>
<propertyid>BBB</propertyid>
<price>4135</price>
<discount>0</discount>
</property>
How can I replace all of this at once using regular expressions in java.
This might be simple question, but I’m new to regular expressions and I need a quick solution.
Thank you all in advance.
BR,
Chamin
1 Answer