From 5a46b3b4efee8ee36b0b453c39b1e2f62c38b38e Mon Sep 17 00:00:00 2001 From: Tanuja Suryawanshi <165241664+TanujaSuryawanshi@users.noreply.github.com> Date: Thu, 9 Oct 2025 11:59:18 +0530 Subject: [PATCH 1/4] Update README_EN.md --- .../3465.Find Products with Valid Serial Numbers/README_EN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md index 8cc4e87aa3017..1ddeccfeeb7df 100644 --- a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md +++ b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md @@ -112,7 +112,7 @@ Based on the above rules, we can use a regular expression to match valid serial # Write your MySQL query statement below SELECT product_id, product_name, description FROM products -WHERE description REGEXP '\\bSN[0-9]{4}-[0-9]{4}\\b' +WHERE description REGEXP '(?-i)\\bSN[0-9]{4}-[0-9]{4}\\b' ORDER BY 1; ``` @@ -123,7 +123,7 @@ import pandas as pd def find_valid_serial_products(products: pd.DataFrame) -> pd.DataFrame: - valid_pattern = r"\bSN[0-9]{4}-[0-9]{4}\b" + valid_pattern = r"(?-i)\bSN[0-9]{4}-[0-9]{4}\b" valid_products = products[ products["description"].str.contains(valid_pattern, regex=True) ] From 7421a830f2396c5d43ee3abe704a3aa7c2ab5d2b Mon Sep 17 00:00:00 2001 From: Libin YANG Date: Thu, 9 Oct 2025 15:15:52 +0800 Subject: [PATCH 2/4] Update README_EN.md --- .../3465.Find Products with Valid Serial Numbers/README_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md index 1ddeccfeeb7df..b49274cf0753c 100644 --- a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md +++ b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md @@ -123,7 +123,7 @@ import pandas as pd def find_valid_serial_products(products: pd.DataFrame) -> pd.DataFrame: - valid_pattern = r"(?-i)\bSN[0-9]{4}-[0-9]{4}\b" + valid_pattern = r"\bSN[0-9]{4}-[0-9]{4}\b" valid_products = products[ products["description"].str.contains(valid_pattern, regex=True) ] From 4eb47beef3c5705a14847de1a3a997e09fa2a16e Mon Sep 17 00:00:00 2001 From: Libin YANG Date: Thu, 9 Oct 2025 15:16:16 +0800 Subject: [PATCH 3/4] Update README.md --- .../3465.Find Products with Valid Serial Numbers/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README.md b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README.md index 2246158fb2d19..d8391013551d7 100644 --- a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README.md +++ b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/README.md @@ -113,7 +113,7 @@ tags: # Write your MySQL query statement below SELECT product_id, product_name, description FROM products -WHERE description REGEXP '\\bSN[0-9]{4}-[0-9]{4}\\b' +WHERE description REGEXP '(?-i)\\bSN[0-9]{4}-[0-9]{4}\\b' ORDER BY 1; ``` From ebf3129c5666d42eb2bc85c23a11100e5a4c724e Mon Sep 17 00:00:00 2001 From: Libin YANG Date: Thu, 9 Oct 2025 15:16:56 +0800 Subject: [PATCH 4/4] Update Solution.sql --- .../3465.Find Products with Valid Serial Numbers/Solution.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/Solution.sql b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/Solution.sql index d5c646b009f03..97f44c9600ebc 100644 --- a/solution/3400-3499/3465.Find Products with Valid Serial Numbers/Solution.sql +++ b/solution/3400-3499/3465.Find Products with Valid Serial Numbers/Solution.sql @@ -1,5 +1,5 @@ # Write your MySQL query statement below SELECT product_id, product_name, description FROM products -WHERE description REGEXP '\\bSN[0-9]{4}-[0-9]{4}\\b' +WHERE description REGEXP '(?-i)\\bSN[0-9]{4}-[0-9]{4}\\b' ORDER BY 1;