Administrator approval is now required for registering new accounts. If you are registering a new account, and are external to the University, please ask the repository owner to contact ServiceLine to request your account be approved. Repository owners must include the newly registered email address, and specific repository in the request for approval.

Verified Commit ad832dde authored by Emily Rowlands's avatar Emily Rowlands
Browse files

Fixed it all.

parent 377c0854
......@@ -26,10 +26,10 @@ public class ECSNames {
}
public static String getNameFromSource(String source) {
Pattern regex = Pattern.compile("(?:\"name\">).*(?:<\\/h1)");
Matcher matcher = regex.matcher(source);
String grp = matcher.group();
return grp.substring("\"name\"".length(), grp.length() - "<\\/h1".length());
Pattern pattern = Pattern.compile("(?<=\"name\">).*(?=<\\/h1)");
Matcher matcher = pattern.matcher(source);
matcher.find(); // As it turns out, this line is vital.
return matcher.group();
}
public static void main(String[] args) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment