Hi I am trying to get a String out of URL.
I am using Regular Expression.
String url = "http://localhost/htc/android/htc-incredible/259164-gpid";
Pattern regex = Pattern.compile("^.+/(\\d+)-gpid$");
Matcher tagmatch = regex.matcher( url );
System.out.println(tagmatch.group(0));
Error:
Exception in thread "main" java.lang.IllegalStateException: No match found
What I am doing wrong: