FIND YOUR NEXT FEW LINES

Results for “MATCH”

Small, practical examples. Search by task or narrow things down below.

194 snippets foundClear filters
PostgresWindows & text

Replace all matching text

Normalize repeated whitespace with a regular expression.

regexp_replace✓ Tested
C++Strings

Replace the first match

Find and replace one literal substring in C++.

C++✓ Tested
Linux CommandsFinding & selecting files

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
Linux CommandsSearching text

Show line numbers beside matches

Linux Commands: Use grep -n so a result identifies its position in the source file.

Linux Commands✓ Tested
ReactLists & filtering

Show the count of matching records

Show the count of matching records with a small React component and explicit browser behavior.

React✓ Tested
Bash ScriptsArguments & decisions

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
C#LINQ transformations

Test whether any or all values match

C#: Any and All short-circuit instead of materializing filtered collections.

C#✓ Tested
JavaScriptText handling & Unicode

Transform each regex match with a callback

JavaScript: A replacement callback computes the replacement separately for each match.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Transform each regex match with a callback

TypeScript: A replacement callback computes the replacement separately for each match.

TypeScript✓ Tested
SQLChange & combine data

Update one matching row

Change a value with an explicit filter.

UPDATE✓ Tested
jQueryGetting Started

Visit matched elements in order

jQuery: Learn how to visit matched elements in order in a complete browser example.

jQuery✓ Tested
jQueryInsertion & wrapping

Wrap each matched element separately

jQuery: wrap adds a parent around each selected element.

jQuery✓ Tested