Results for “Text validation & parsing”
Small, practical examples. Search by task or narrow things down below.
Search for a literal LIKE wildcard
SQL Server: Declare an escape character so a percent sign in the pattern is literal.
SQL Server✓ Tested
Search for a literal LIKE wildcard
Postgres: Declare an escape character so a percent sign in the pattern is literal.
Postgres✓ Tested
Search for a literal LIKE wildcard
SQLite: Declare an escape character so a percent sign in the pattern is literal.
SQLite✓ Tested
Search for a literal string
Linux Commands: Use grep -F when the pattern contains regex metacharacters that should be literal.
Linux Commands✓ Tested
Select the contents of an input
Select the contents of an input with a small React component and explicit browser behavior.
React✓ Tested
Serialize a 16-bit integer in big-endian order
C: Explicit shifts make a byte format independent of the CPU’s native byte order.
C✓ Tested
Show line numbers beside matches
Linux Commands: Use grep -n so a result identifies its position in the source file.
Linux Commands✓ Tested
Split a key-value pair once
Split a key-value pair once using a complete Go program with explicit sample inputs.
Go✓ Tested
Split a writable comma-delimited buffer
Arduino / C: strtok modifies its buffer and returns successive tokens.
Arduino / C✓ Tested
Split on repeated whitespace
Split on repeated whitespace using a complete Go program with explicit sample inputs.
Go✓ Tested
Track whether a form differs from its initial value
Track whether a form differs from its initial value with a small React component and explicit browser behavior.
React✓ Tested
Transform each regex match with a callback
JavaScript: A replacement callback computes the replacement separately for each match.
JavaScript✓ Tested