Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I have a string value where I am getting the a integer with ')' I want to remove the ')' have the value separated from all the unwanted special characters. Do any one here have any idea how can I remove the ')'. I have tried stringValue.replace('\)'. ''), but it is not working.

share|improve this question

1 Answer 1

Something like :

String s = '(09890)';
Integer i = Integer.valueOf(s.replaceAll('[\\(\\)]',''));
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.