FIND YOUR NEXT FEW LINES

Results for “match”

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

194 snippets foundClear filters
Bash ScriptsLoops & decisions

Check whether input is a nonnegative integer

Reject empty input and nonnumeric characters before arithmetic.

validation✓ Tested
Bash ScriptsArguments & decisions

Choose among several numeric ranges

Bash Scripts: An if-elif chain evaluates branches in order and executes the first match.

Bash Scripts✓ Tested
Arduino / CText & bounded buffers

Compare a command case-sensitively

Arduino / C: strcmp returns zero when both null-terminated strings match.

Arduino / C✓ Tested
Bash ScriptsParameter expansion

Convert a variable to uppercase

Bash Scripts: Double caret transforms matching lowercase characters in Bash 4 or later.

Bash Scripts✓ Tested
C++Sequence algorithms

Count elements satisfying a predicate

C++: count_if counts matches without constructing a filtered collection.

C++✓ Tested
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
PowerShellFunctions & parameter validation

Dispatch values with wildcard patterns

PowerShell: Switch -Wildcard interprets shell-style matching patterns for each clause.

PowerShell✓ Tested
jQueryCollections & styling

Exclude elements from a collection

jQuery: not removes matching elements from the current selection.

jQuery✓ Tested
Bash ScriptsParameter expansion

Extract a basename without an external process

Bash Scripts: Double hash removes the longest matching prefix ending in a slash.

Bash Scripts✓ Tested
Bash ScriptsParameter expansion

Extract a parent path with parameter expansion

Bash Scripts: Percent removes the shortest matching slash-and-suffix portion.

Bash Scripts✓ Tested
PythonStrings & dates

Extract numbers from text

Find all runs of ASCII digits in a string and convert the matches to integers.

regex✓ Tested
jQueryTraversal & selection

Filter a selection

Reduce a jQuery selection to elements with a matching class.

jQuery✓ Tested