Results for “glob”
Small, practical examples. Search by task or narrow things down below.
Find matching files recursively
Python: Use rglob and sorted relative paths for a reproducible recursive file listing.
Python✓ Tested
Handle a filename pattern with no matches
Use nullglob so an unmatched pattern produces an empty array.
nullglob✓ Tested
Prevent a variable value from expanding as a filename pattern
Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.
Bash Scripts✓ Tested
Disable animations for a reduced-motion mode
jQuery: The global fx.off switch causes effects to finish immediately.
jQuery✓ Tested
Extract all regex matches with their groups
JavaScript: matchAll requires a global regular expression and returns an iterator of matches.
JavaScript✓ Tested
Extract all regex matches with their groups
TypeScript: matchAll requires a global regular expression and returns an iterator of matches.
TypeScript✓ Tested
List untracked files while honoring ignore rules
Git: Use others and exclude-standard together to respect repository and global ignore configuration.
Git✓ Tested
Replace every occurrence in a string
Substitute text directly with Bash parameter expansion.
replace✓ Tested
Understand setup() and loop()
Arduino / C: See initialization run once and the main loop run repeatedly.
Arduino / C✓ Tested