I have the following pattern:
(COMPANY) -277.9887 (ASP,) -277.9887 (INC.)
I want the final output to be:
COMPANY ASP, INC.
Currently I have the following code and it keeps returning the original pattern ( I assume because the group all falls between the first '(' and last ')'
Pattern p = Pattern.compile("((.*))",Pattern.DOTALL);
Matcher matcher = p.matcher(eName);
while(matcher.find())
{
System.out.println("found match:"+matcher.group(1));
}
I am struggling to get the results I need and appreciate any help. I am not worried about concatenating the results after I get each group, just need to get each group.