From f13995aa5cc871d15934415442f9c34990242640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Mon, 18 May 2020 11:42:58 +0200 Subject: [PATCH] [API/Mobidziennik] Fix lucky number extraction. --- .../main/java/pl/szczodrzynski/edziennik/data/api/Regexes.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/Regexes.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/Regexes.kt index aa3fac8d..b21a38bb 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/Regexes.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/Regexes.kt @@ -40,7 +40,7 @@ object Regexes { """\(([0-9A-ząęóżźńśłć]*?)\)$""".toRegex(DOT_MATCHES_ALL) } val MOBIDZIENNIK_LUCKY_NUMBER by lazy { - """class="szczesliwy_numerek".*>0*([0-9]+)(?:/0*[0-9]+)*""".toRegex(DOT_MATCHES_ALL) + """class="szczesliwy_numerek".*?>0?([0-9]+)/?0?([0-9]+)?""".toRegex(DOT_MATCHES_ALL) } val MOBIDZIENNIK_CLASS_CALENDAR by lazy { """events: (.+),$""".toRegex(RegexOption.MULTILINE)