Loading problem...
A merchandising analytics team is validating product naming conventions before a catalog release.
Table: Products
A product is considered a match if its name contains at least one isolated block of exactly three digits.
A three-digit block is isolated when:
Examples:
Task: Return every row from Products that matches this rule.
Output requirements:
Supported submission environments:
Products:
| product_id | name |
|------------|-------------------|
| 1 | AXE123PRO |
| 2 | A12B34C |
| 3 | Mega56789Pack |
| 4 | 789Starter |
| 5 | Item003Label |
| 6 | NoDigitsHere |[
{"product_id":1,"name":"AXE123PRO"},
{"product_id":4,"name":"789Starter"},
{"product_id":5,"name":"Item003Label"}
]Rows 1, 4, and 5 each contain at least one isolated 3-digit block. Rows 2 and 6 have no 3-digit run, and row 3 has a 5-digit run.
Products:
| product_id | name |
|------------|----------------|
| 10 | X123Y456Z |
| 11 | X1234Y |
| 12 | AB001-CD |
| 13 | 99123A |
| 14 | A1B2C3 |[
{"product_id":10,"name":"X123Y456Z"},
{"product_id":12,"name":"AB001-CD"}
]Rows 10 and 12 have isolated 3-digit runs. Rows 11 and 13 contain longer digit runs, and row 14 never reaches three consecutive digits.
Products:
| product_id | name |
|------------|-----------|
| 21 | 123 |
| 22 | 1234 |
| 23 | A000B |
| 24 | A0000B |
| 25 | AB12 |[
{"product_id":21,"name":"123"},
{"product_id":23,"name":"A000B"}
]Full-string boundaries still count as isolated boundaries. Any 4-digit run is rejected.
Constraints