Results for “match”
Small, practical examples. Search by task or narrow things down below.
Treat an empty trimmed value as missing
Postgres: NULLIF converts an empty string to NULL before a fallback is applied.
Postgres✓ Tested
Treat an empty trimmed value as missing
SQLite: NULLIF converts an empty string to NULL before a fallback is applied.
SQLite✓ Tested
Validate an entire identifier
Python: Use fullmatch so a regex must consume the complete input.
Python✓ Tested
Accept either of two conditions
SQL: Use OR to keep matching names or out-of-stock rows.
SQL✓ Tested
Accept either of two conditions
SQL Server: Use OR to keep matching names or out-of-stock rows.
SQL Server✓ Tested
Accept either of two conditions
Postgres: Use OR to keep matching names or out-of-stock rows.
Postgres✓ Tested
Accept either of two conditions
SQLite: Use OR to keep matching names or out-of-stock rows.
SQLite✓ Tested
Allow one disclosure in a named group to stay open
HTML: Matching details name attributes create an exclusive native accordion in supporting browsers.
HTML✓ Tested
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Check any and all stream elements
Java: Use short-circuiting match operations for predicates over a Java collection.
Java✓ Tested
Check array membership with includes
JavaScript: includes uses SameValueZero comparison, which also matches NaN.
JavaScript✓ Tested
Check array membership with includes
TypeScript: includes uses SameValueZero comparison, which also matches NaN.
TypeScript✓ Tested