From ddfb74868f73710d7d7fa05d311af1981bc30f13 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Fri, 29 Jun 2012 19:41:35 +0200 Subject: refactoring: shorten regex to be more fault tolerant --- main/src/cgeo/geocaching/connector/gc/GCConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/src/cgeo/geocaching/connector/gc') diff --git a/main/src/cgeo/geocaching/connector/gc/GCConstants.java b/main/src/cgeo/geocaching/connector/gc/GCConstants.java index bb01b2f..ff1b442 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCConstants.java +++ b/main/src/cgeo/geocaching/connector/gc/GCConstants.java @@ -42,7 +42,7 @@ public final class GCConstants { public final static Pattern PATTERN_FOUND_ALTERNATIVE = Pattern.compile("
[^<]*

"); public final static Pattern PATTERN_OWNER_DISPLAYNAME = Pattern.compile("
[^<]+([^<]+)
"); - public final static Pattern PATTERN_TYPE = Pattern.compile("\"([^\"]+?)\""); + public final static Pattern PATTERN_TYPE = Pattern.compile("\"([^\"]+?)\"[^]*>"); public final static Pattern PATTERN_HIDDEN = Pattern.compile("
\\W*Hidden[\\s:]*([^<]+?)
"); public final static Pattern PATTERN_HIDDENEVENT = Pattern.compile("Event\\s*Date\\s*:\\s*([^<]+)
", Pattern.DOTALL); public final static Pattern PATTERN_FAVORITE = Pattern.compile("
"); // without 'class="hideMe"' inside the tag ! -- cgit v1.1