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
PostgresJSON & arrays

Read a JSONB field as text

Extract a nested value from a JSON document.

jsonb✓ Tested
SQLText cleanup & matching

Remove surrounding spaces from text

SQL: TRIM removes leading and trailing space characters by default.

SQL✓ Tested
SQL ServerText cleanup & matching

Remove surrounding spaces from text

SQL Server: TRIM removes leading and trailing space characters by default.

SQL Server✓ Tested
PostgresText cleanup & matching

Remove surrounding spaces from text

Postgres: TRIM removes leading and trailing space characters by default.

Postgres✓ Tested
SQLiteText cleanup & matching

Remove surrounding spaces from text

SQLite: TRIM removes leading and trailing space characters by default.

SQLite✓ Tested
PostgresWindows & text

Replace all matching text

Normalize repeated whitespace with a regular expression.

regexp_replace✓ Tested
HTMLInput constraints

Require a nonempty text value

HTML: The required attribute makes an empty text control fail native constraint validation.

HTML✓ Tested
PostgresRows & writes

Search text without case sensitivity

Match a pattern with PostgreSQL ILIKE.

ILIKE✓ Tested
SQL ServerDates & text

Split delimited text with positions

Retain original order with STRING_SPLIT ordinals.

STRING_SPLIT✓ Tested
HTMLGetting Started

Accept several lines of text

HTML: Learn how to accept several lines of text in a complete browser example.

HTML✓ Tested
HTMLForms

Add a multiline text field

Set a maximum length and visible rows on a labeled HTML textarea.

HTML✓ Tested
RustErrors & optional values

Add context to a parsing failure

Add context to a parsing failure in a complete Rust program using the standard library.

Rust✓ Tested