From e8b9ef94be37bbd770d7e5a70b9b78472e7f6952 Mon Sep 17 00:00:00 2001 From: hyejungg Date: Sun, 5 Jan 2025 16:29:42 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=80=EA=B2=A9=EC=9D=B4=20=EC=97=86?= =?UTF-8?q?=EB=8B=A4=EB=A9=B4=20description=EC=97=90=EC=84=9C=20=EC=88=AB?= =?UTF-8?q?=EC=9E=90=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EA=B0=80=20=EC=9E=88?= =?UTF-8?q?=EC=9C=BC=EB=A9=B4=20=ED=95=B4=EB=8B=B9=20=EA=B0=92=EC=9D=84=20?= =?UTF-8?q?=EA=B0=80=EC=A0=B8=EC=98=A4=EB=8F=84=EB=A1=9D=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/parser.js b/src/lib/parser.js index e9925f2..b4759c4 100644 --- a/src/lib/parser.js +++ b/src/lib/parser.js @@ -65,10 +65,10 @@ const parsingForGeneral = async (url) => { if (!itemPrice) { const description = value; - const priceRegex = /(\d{1,3}(,\d{3})*(\.\d{2})?)/; - const matchPriceString = priceRegex.exec(description)[1]; + const priceRegex = /\d{1,3}(,\d{3})*원/g; + const matchPriceString = description.match(priceRegex); if (matchPriceString) { - itemPrice = matchPriceString; + itemPrice = matchPriceString[0]; } } break;