Pages

Tuesday, 29 May 2012

getting the numeric with - . from a string


//getting the only numeric values with . -
String strs = priceString.replaceAll("[^\\d-.]", "");
example: if priceString is Rs 25.73 L - 27.75 L
it returns 25.73-27.75

No comments:

Post a Comment