This is my regex:
((((?<=(\d\.)(([1-9]))))|((?<=\d)\.[0])))((0)+)
This is my Description:
af 0.044 00.22 44.3500,44.334000,0.5000,1.750,1.9000,0.1480,10.2500,0.7480",19.00 MM,62.00MM,12MM,12.0000MM,DRILL BIT,0.040',1.00 IN MINI BEND RADIUS|0.3120IN TIP DIA|36.00 IN LG,45MM,45.0000MM,30MM,30.0000MM,40MM,40.0000MM,40.00 15.20,40.00,15.20000:14.00,40.00;15.20000*14.00X40.00/15.20000(14.00),40.00\15.20000{14.00},40.00|15.20000[14.00],40.00?15.20000%14.00,15.20000{14.00},40.00|15.20000,15.20000%14.00, 345.00 354.34500aa 354.aa 354. ABC.000 17.0
As per requirement it should removing trailing 0's from the description.The above regex is removing the zeros but failing in some conditions. Like its failing on if value is 0.040, can anyone suggest me a better regex which would satisfy all the conditions.
replaceAll("\\.?0+(?![0-9.])", "")354.? IsABC.000to be touched? Please post the expected output.