mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-19 00:39:58 +00:00
performance-optimized lots of regular expressions
git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@160 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
parent
3a4e676617
commit
313ebe8d02
6 changed files with 37 additions and 37 deletions
|
@ -237,7 +237,7 @@ public final class VbbProvider implements NetworkProvider
|
|||
return (int) (value * 1000000);
|
||||
}
|
||||
|
||||
private static final Pattern P_CHECK_ADDRESS = Pattern.compile("<option.*?>\\s*(.*?)\\s*</option>", Pattern.DOTALL);
|
||||
private static final Pattern P_CHECK_ADDRESS = Pattern.compile("<option[^>]*>\\s*(.*?)\\s*</option>", Pattern.DOTALL);
|
||||
private static final Pattern P_CHECK_FROM = Pattern.compile("Von:");
|
||||
private static final Pattern P_CHECK_TO = Pattern.compile("Nach:");
|
||||
private static final Pattern P_CHECK_CONNECTIONS_ERROR = Pattern
|
||||
|
@ -527,7 +527,7 @@ public final class VbbProvider implements NetworkProvider
|
|||
+ "<td><strong>(\\d{1,2}:\\d{2})</strong></td>.*?" // time
|
||||
+ "<strong>\\s*(.*?)[\\s\\*]*</strong>.*?" // line
|
||||
+ "(?:\\((Gl\\. " + ParserUtils.P_PLATFORM + ")\\).*?)?" // position
|
||||
+ "<a href=\"/Fahrinfo/bin/stboard\\.bin/dox/dox.*?evaId=(\\d+)&.*?>" // destinationId
|
||||
+ "<a href=\"/Fahrinfo/bin/stboard\\.bin/dox/dox.*?evaId=(\\d+)&[^>]*>" // destinationId
|
||||
+ "\\s*(.*?)\\s*</a>.*?" // destination
|
||||
, Pattern.DOTALL);
|
||||
private static final Pattern P_DEPARTURES_SERVICE_DOWN = Pattern.compile("Wartungsarbeiten");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue