From 28f61a309906f0b3dbdf6646b6c8a61cb073d7b1 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 20 Jul 2025 17:44:46 +0200 Subject: [PATCH] Improve regular expression --- moneymgr_mobile/android/app/build.gradle.kts | 2 +- moneymgr_mobile/lib/utils/ocr_utils.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/moneymgr_mobile/android/app/build.gradle.kts b/moneymgr_mobile/android/app/build.gradle.kts index ecf9ed6..20cd534 100644 --- a/moneymgr_mobile/android/app/build.gradle.kts +++ b/moneymgr_mobile/android/app/build.gradle.kts @@ -59,7 +59,7 @@ android { create("development") { dimension = "default" applicationIdSuffix = ".debug" - // signingConfig = signingConfigs.getByName("debug") + signingConfig = signingConfigs.getByName("debug") } create("publish") { dimension = "default" diff --git a/moneymgr_mobile/lib/utils/ocr_utils.dart b/moneymgr_mobile/lib/utils/ocr_utils.dart index 6a7fd10..bc6fe6e 100644 --- a/moneymgr_mobile/lib/utils/ocr_utils.dart +++ b/moneymgr_mobile/lib/utils/ocr_utils.dart @@ -27,7 +27,7 @@ Future extractTotalFromBill(Uint8List imgBuff) async { // Check for highest amount on invoice final regexp = RegExp( - r'([0-9]+([ ]*(\\.|,)[ ]*[0-9]{1,2}){0,1})[ \\t\\n]*(EUR|eur|€)', + r'([0-9]+([ ]*(\\.|,)[ ]*[0-9]{1,2}){0,1})([ \\t\\n]*(EUR|eur|€)|E)', multiLine: true, caseSensitive: false, );