FIND YOUR NEXT FEW LINES

Results for “Text validation & formatting”

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

939 snippets foundClear filters
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
PythonStrings & dates

Replace text in a string

Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.

string✓ 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
GoErrors & validation

Return a descriptive validation error

Return a descriptive validation error using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsFunctions & arguments

Return text from a shell function

Capture a function’s output with command substitution.

function✓ Tested
PythonFunctions & error handling

Run cleanup around a custom context

Python: Use try/finally inside a contextmanager so cleanup runs even on failure.

Python✓ Tested
CSSResponsive design

Scale text within limits

Use CSS clamp to bound responsive font sizing.

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

Search text without case sensitivity

Linux Commands: Use grep -i to match uppercase and lowercase variants.

Linux Commands✓ Tested