How can I get inside parentheses value in a string?
String str= "United Arab Emirates Dirham (AED)";
I need only AED text.
You could try:
String str = "United Arab Emirates Dirham (AED)"; int firstBracket = str.indexOf('('); String contentOfBrackets = str.substring(firstBracket + 1, str.indexOf(')', firstBracket));