Hi I am trying to build one regex to extract 4 digit number from given string using java. I tried it in following ways:
String mydata = \"get the 0025 data f
Many better answers, but if you still have to use in the same way.
String mydata = "get the 0025 data from string"; Pattern pattern = Pattern.compile("(?
changed matcher.group(1); to matcher.group(0);
matcher.group(1);
matcher.group(0);