FIND YOUR NEXT FEW LINES

Results for “Strings & text”

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

474 snippets foundClear filters
JavaScriptRegular expressions & URL encoding

Reorder captured text in a replacement

JavaScript: Use numbered replacement groups to rearrange a known two-part name.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Reorder captured text in a replacement

TypeScript: Use numbered replacement groups to rearrange a known two-part name.

TypeScript✓ Tested
JavaText validation & formatting

Repeat text a fixed number of times

Java: Use String.repeat with a nonnegative repetition count.

Java✓ Tested
PowerShellGetting Started

Replace a literal word in text

PowerShell: Replace a literal word in text using PowerShell 7.

PowerShell✓ Tested
Bash ScriptsFiles & reliability

Replace a text file with an atomic rename

Prepare new content beside the target before renaming it into place.

atomic write✓ Tested
PostgresWindows & text

Replace all matching text

Normalize repeated whitespace with a regular expression.

regexp_replace✓ Tested
Linux CommandsGetting Started

Replace text in a pipeline

Linux Commands: Replace text in a pipeline using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
C++Text validation & parsing

Replace text using captured regex groups

C++: Numbered replacement groups can rearrange a known two-part name.

C++✓ Tested
Bash ScriptsGetting Started

Replace text with parameter expansion

Bash Scripts: Replace text with parameter expansion with a small standalone Bash program.

Bash Scripts✓ Tested
Linux CommandsText processing

Replace text with sed

Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.

sed✓ Tested
HTMLText semantics

Represent removed and inserted text

HTML: Del and ins record a textual change while retaining both versions in the document.

HTML✓ Tested
AngularTemplate-driven forms

Require a minimum text length

Require a minimum text length with a standalone Angular component and explicit browser behavior.

Angular✓ Tested