From b612e6483c2a62fa9ea345221bd1f53623d701d9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 10 Feb 2013 11:32:47 +0100 Subject: Replace all +n messages with Verspätung MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cgi/index.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cgi/index.pl b/cgi/index.pl index 6fdfcb8..0aef77a 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -84,8 +84,9 @@ sub handle_request { if ( $info eq '+0' ) { $info = undef; } - if ( $info and $info =~ m{ ^ \+ (\d+) $ }ox ) { - $info = "Verspaetung ca. $1 Minuten"; + if ($info) { + $info =~ s{ ^ (?: ca\. \s* )? \+ (\d+) }{Verspaetung ca. $1 Minuten}x; + $info =~ s{ 1 \s Minute\Kn }{}x; } push( @departures, -- cgit v1.2.3