Skip to content
Snippets Groups Projects
Commit dd78ad34 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Fix --date verification regex

parent 616becbf
No related branches found
No related tags found
No related merge requests found
......@@ -288,7 +288,7 @@ if ($time) {
@post{'itdTimeHour', 'itdTimeMinute'} = split(/:/, $time);
}
if ($date) {
if ($date !~ /^ [0-3]? \d \. [01]? \d (?: \. \d{4} )? /x) {
if ($date !~ /^ [0-3]? \d \. [01]? \d (?: \. \d{4} )? $/x) {
die("Invalid argument: Usage: --date DD.MM[.YYYY]\n");
}
@post{'itdDateDay', 'itdDateMonth', 'itdDateYear'} = split(/\./, $date);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment