HF RL Explorer

Task: Using Regex in WHERE Clause in PostgreSQL

Task: Using Regex in WHERE Clause in PostgreSQL: a task in Terminal-Lego-15k (Harbor dataset). Demonstrate how to properly use regex pattern matching in a PostgreSQL WHERE clause. The common mistake is using regexp matches() in a WHERE clause, which returns text instead of a boolean. Your task is…

The task

Demonstrate how to properly use regex pattern matching in a PostgreSQL `WHERE` clause. The common mistake is using `regexp_matches()` in a WHERE clause, which returns `text[]` instead of a boolean. Your task is to write the correct SQL query that filters rows using regex pattern matching.

Part of PrimeIntellect/Terminal-Lego-15k.