From 15489b5b141eb2c675605603f4873bcbf70c3e10 Mon Sep 17 00:00:00 2001 From: Andrii Lavrenko Date: Tue, 20 Aug 2024 08:55:53 +0300 Subject: [PATCH] Fix issue #222 Update regex for more price formats --- code.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code.user.js b/code.user.js index e4d4060..25f3b5c 100644 --- a/code.user.js +++ b/code.user.js @@ -2567,8 +2567,8 @@ } function getPriceValueAsInt(listing) { - const regex = /\d+[.,]\d{0,2}/gm; - const results = listing.match(regex); + // Match number part from any currency format + const results = listing.match(/\d[0-9 .,]*(\.|,\d{0,2})?/gm); if (results == null) { return 0;