I have a String, where I want to extract a portion of it based on a Regular Expression.
Say if my String is
String regex = "test<123>test";
I need to extract the numeric part of it which is inside the <> signs. So I could use the RegEx as <[0-9]*> (kind of).
But the problem is I checked up the String class API and it has support for only matching, that is I would know whether there is a regEx like this. But how can I extract it and store it inside another String.