Results for “MATCH”
Small, practical examples. Search by task or narrow things down below.
Replace all matching text
Normalize repeated whitespace with a regular expression.
regexp_replace✓ Tested
Replace the first match
Find and replace one literal substring in C++.
C++✓ Tested
Run a command safely for each matching file
Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.
Linux Commands✓ Tested
Show line numbers beside matches
Linux Commands: Use grep -n so a result identifies its position in the source file.
Linux Commands✓ Tested
Show the count of matching records
Show the count of matching records with a small React component and explicit browser behavior.
React✓ Tested
Stop a search loop at the first match
Bash Scripts: Break exits the current loop as soon as the desired item is found.
Bash Scripts✓ Tested
Test whether any or all values match
C#: Any and All short-circuit instead of materializing filtered collections.
C#✓ Tested
Transform each regex match with a callback
JavaScript: A replacement callback computes the replacement separately for each match.
JavaScript✓ Tested
Transform each regex match with a callback
TypeScript: A replacement callback computes the replacement separately for each match.
TypeScript✓ Tested
Update one matching row
Change a value with an explicit filter.
UPDATE✓ Tested
Visit matched elements in order
jQuery: Learn how to visit matched elements in order in a complete browser example.
jQuery✓ Tested
Wrap each matched element separately
jQuery: wrap adds a parent around each selected element.
jQuery✓ Tested