I’m trying to get a value from an HTML page that has the name “this”
ex:
name="this" value="XXXX-XXX-xxxxx-xxxxx"
I tried to use
Pattern pat = Pattern.compile("name=\"this\" value=\"(.*?)\"");
Matcher match = pat.matcher(sb);
if(match.matches())
return match.group();
But nothing returned. What should I do?
Like Joop said; use “find”:
Also note that you’ll want to retrieve “group(1)”, since just group() returns the entire pattern match.