Skip to content

Commit 5a46b3b

Browse files
Update README_EN.md
1 parent c2d1cd9 commit 5a46b3b

File tree

1 file changed

+2
-2
lines changed
  • solution/3400-3499/3465.Find Products with Valid Serial Numbers

1 file changed

+2
-2
lines changed

solution/3400-3499/3465.Find Products with Valid Serial Numbers/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Based on the above rules, we can use a regular expression to match valid serial
112112
# Write your MySQL query statement below
113113
SELECT product_id, product_name, description
114114
FROM products
115-
WHERE description REGEXP '\\bSN[0-9]{4}-[0-9]{4}\\b'
115+
WHERE description REGEXP '(?-i)\\bSN[0-9]{4}-[0-9]{4}\\b'
116116
ORDER BY 1;
117117
```
118118

@@ -123,7 +123,7 @@ import pandas as pd
123123

124124

125125
def find_valid_serial_products(products: pd.DataFrame) -> pd.DataFrame:
126-
valid_pattern = r"\bSN[0-9]{4}-[0-9]{4}\b"
126+
valid_pattern = r"(?-i)\bSN[0-9]{4}-[0-9]{4}\b"
127127
valid_products = products[
128128
products["description"].str.contains(valid_pattern, regex=True)
129129
]

0 commit comments

Comments
 (0)