I am trying to achieve something like this
Input -> ( 10 )
I want output as (10)
I want to eliminate space between brackets and numbers in Java using String.removeAll()
,
[Note: Only one space is there]
Unable to write regular expression for this.
I tried:
String s = "( 10 )";
Sysout(s.removeAll("\\( [0-9]+ \\) )" , "\\([0-9]+)"));
But its not working