reworked patterns

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@148 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach 2010-09-07 23:23:30 +00:00
parent 75df8f3678
commit 254752c705

View file

@ -318,20 +318,20 @@ public class RmvProvider implements NetworkProvider
+ "(?:Ankunft: \\d{2}\\.\\d{2}\\.\\d{2}<br />\n)?" // + "(?:Ankunft: \\d{2}\\.\\d{2}\\.\\d{2}<br />\n)?" //
+ "Dauer: (\\d{1,2}:\\d{2})<br />.*?" // duration + "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" //
+ "(?:(.*?) nach (.*?)\n?" // line, destination + "(?:(.*?) nach (.*?)\n" // line, destination
+ "<br />\n?" // + "<br />\n" //
+ "ab (\\d+:\\d+)\n?" // departureTime + "ab (\\d{1,2}:\\d{2})\n" // departureTime
+ "(.*?)\\s*\n?" // departurePosition + "(?:(.*?)\\s*\n)?" // departurePosition
+ "<br />\n?" // + "<br />\n" //
+ "an (\\d+:\\d+)\n?" // arrivalTime + "an (\\d{1,2}:\\d{2})\n" // arrivalTime
+ "(.*?)\\s*\n?" // arrivalPosition + "(?:(.*?)\\s*\n)?" // arrivalPosition
+ "<br />\n?|" // + "<br />\n|" //
+ "<a href=\".*?\">\n?" // + "<a href=[^>]*>\n" //
+ "Fussweg\\s*\n?" // + "Fussweg\\s*\n" //
+ "</a>\n?" // + "</a>\n" //
+ "(\\d+) Min.<br />\n?)" // footway + "(\\d+) Min.<br />\n)" // footway
+ "- <b>(.*?)" // arrival + "- <b>(.*?)" // arrival
, Pattern.DOTALL); , Pattern.DOTALL);