Script schedule: slight changes in regexps done.
This commit is contained in:
parent
ce8e63e5b6
commit
2f61ebe368
4
schedule
4
schedule
@ -127,7 +127,7 @@ get_tour_num() {
|
||||
get_tour_dates() {
|
||||
local date_re="[0-9?]{2}\\.[0-9?]{2}\\.[0-9?]{4}"
|
||||
|
||||
if [[ "$1" =~ "Время проведения:"' '*($date_re)' '*[-—]' '*($date_re) ]]; then
|
||||
if [[ "$1" =~ "Время проведения:"\ *($date_re)\ *[-—]\ *($date_re) ]]; then
|
||||
date_beg="${BASH_REMATCH[1]}" date_end="${BASH_REMATCH[2]}"
|
||||
# Use short dates
|
||||
date_beg="${date_beg:0:5}" date_end="${date_end:0:5}"
|
||||
@ -142,7 +142,7 @@ keep_game_info() {
|
||||
local res_re="(0|1|0\\.5):(0|1|0\\.5)"
|
||||
local line="$1" keep=1
|
||||
|
||||
if [[ "$line" =~ ($date_re)' '*[-—]' '*([^' ']+)' '*($res_re)?' '*([^' ']+) ]]; then
|
||||
if [[ "$line" =~ ($date_re)\ *[-—]\ *([^\ ]+)\ *($res_re)?\ *([^\ ]+) ]]; then
|
||||
white="${BASH_REMATCH[5]}"
|
||||
black="${BASH_REMATCH[9]}"
|
||||
result="${BASH_REMATCH[6]}"
|
||||
|
Loading…
Reference in New Issue
Block a user