You need to sign in to do that
Don't have an account?
ForceLover
Removing non numeric data from a field
Hi Everyone ,
i have two fields (field1,field2) and i need to remove all non numeric characters from field1 and has to store the remaining numeric data in field2 how can i achieve this....suggest me in this regard
Here is some logic that separates alpha characters from numeric ones, hope it helps you.
Just missing one part
String str = '(667) 788 455435dsdsdasdasd 445345...4/6fsdsdds';
str = str.replaceAll('\\D', '');
System.debug('Final integer : '+str );
// output : 66778845543544534546