FIND YOUR NEXT FEW LINES

Results for “pattern”

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

63 snippets foundClear filters
Linux CommandsFinding & selecting files

Match filenames without case sensitivity

Linux Commands: Use iname for a case-insensitive filename pattern.

Linux Commands✓ Tested
C#Text validation & encoding

Quote a literal search term for a regex

C#: Regex.Escape prevents metacharacters in a literal term from changing the pattern.

C#✓ Tested
Bash ScriptsText parsing & arithmetic

Remove a trailing carriage return from a line

Bash Scripts: Use an ANSI-C quoted carriage return as the suffix pattern.

Bash Scripts✓ Tested
Bash ScriptsVariables & text

Replace every occurrence in a string

Substitute text directly with Bash parameter expansion.

replace✓ Tested
PowerShellText & data

Replace repeated whitespace

Normalize runs of whitespace to one space.

regex✓ Tested
SQLiteQueries & text

Search a small FTS5 table

Use SQLite’s full-text index to match a term.

FTS5✓ Tested
SQLText cleanup & matching

Search for a literal LIKE wildcard

SQL: Declare an escape character so a percent sign in the pattern is literal.

SQL✓ Tested
SQL ServerText cleanup & matching

Search for a literal LIKE wildcard

SQL Server: Declare an escape character so a percent sign in the pattern is literal.

SQL Server✓ Tested
PostgresText cleanup & matching

Search for a literal LIKE wildcard

Postgres: Declare an escape character so a percent sign in the pattern is literal.

Postgres✓ Tested
SQLiteText cleanup & matching

Search for a literal LIKE wildcard

SQLite: Declare an escape character so a percent sign in the pattern is literal.

SQLite✓ Tested
Linux CommandsSearching text

Search for a literal string

Linux Commands: Use grep -F when the pattern contains regex metacharacters that should be literal.

Linux Commands✓ Tested
Linux CommandsText processing

Search for text in a file

Find matching lines with their line numbers, ignoring letter case and treating the pattern as literal text.

grep✓ Tested