My java code:
String str2 = "\"49110-01-T-GST" + "\"";
And I just want to extract the 49110 out of the above string which has leading and trailing double quotes.
So I am using:
str2.replaceAll("^\"|-.*", "")
Above line solve the purpose but now I get sonar issue which says
Group parts of the regex together to make the intended operator precedence explicit.
Can anyone please fix the sonar issue