fixed could not parse Ankunft in connection details header

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@146 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-09-07 22:38:05 +00:00
parent 568b829744
commit d17e6f703e

View file

@ -303,10 +303,11 @@ public class RmvProvider implements NetworkProvider
} }
} }
private static final Pattern P_CONNECTION_DETAILS_HEAD = Pattern.compile(".*?<p class=\"details\">\n?" // private static final Pattern P_CONNECTION_DETAILS_HEAD = Pattern.compile(".*?<p class=\"details\">\n" //
+ "- <b>(.*?)</b> -.*?" // firstDeparture + "- <b>(.*?)</b> -.*?" // firstDeparture
+ "Abfahrt: (\\d+\\.\\d+\\.\\d+)<br />\n?"// date + "Abfahrt: (\\d{2}\\.\\d{2}\\.\\d{2})<br />\n"// date
+ "Dauer: (\\d+:\\d+)<br />.*?" // duration + "(?:Ankunft: \\d{2}\\.\\d{2}\\.\\d{2}<br />\n)?" //
+ "Dauer: (\\d{1,2}:\\d{2})<br />.*?" // duration
, Pattern.DOTALL); , Pattern.DOTALL);
private static final Pattern P_CONNECTION_DETAILS_COARSE = Pattern.compile("/b> -\n?(.*?- <b>.*?)<", Pattern.DOTALL); private static final Pattern P_CONNECTION_DETAILS_COARSE = Pattern.compile("/b> -\n?(.*?- <b>.*?)<", Pattern.DOTALL);
private static final Pattern P_CONNECTION_DETAILS_FINE = Pattern.compile("<br />\n?" // private static final Pattern P_CONNECTION_DETAILS_FINE = Pattern.compile("<br />\n?" //