FIND YOUR NEXT FEW LINES

Results for “Text validation & parsing”

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

547 snippets foundClear filters
GoErrors & validation

Reject non-finite numeric input

Reject non-finite numeric input using a complete Go program with explicit sample inputs.

Go✓ Tested
GoStrings & text

Remove an optional prefix

Remove an optional prefix using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsTransforming text

Remove blank or whitespace-only lines

Linux Commands: Use a POSIX character class so tabs and spaces are handled together.

Linux Commands✓ Tested
Linux CommandsTransforming text

Remove carriage-return characters

Linux Commands: Use tr -d to remove CR characters from Windows-style line endings.

Linux Commands✓ Tested
Linux CommandsTransforming text

Reorder fields with a capture group

Linux Commands: Use extended regular expressions and backreferences to rearrange a known format.

Linux Commands✓ Tested
JavaScriptText handling & Unicode

Repeat a string a fixed number of times

JavaScript: String.repeat requires a nonnegative finite repetition count.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Repeat a string a fixed number of times

TypeScript: String.repeat requires a nonnegative finite repetition count.

TypeScript✓ Tested
SQLText cleanup & matching

Replace a literal substring

SQL: REPLACE performs a literal replacement rather than a regular-expression substitution.

SQL✓ Tested
SQL ServerText cleanup & matching

Replace a literal substring

SQL Server: REPLACE performs a literal replacement rather than a regular-expression substitution.

SQL Server✓ Tested
PostgresText cleanup & matching

Replace a literal substring

Postgres: REPLACE performs a literal replacement rather than a regular-expression substitution.

Postgres✓ Tested
SQLiteText cleanup & matching

Replace a literal substring

SQLite: REPLACE performs a literal replacement rather than a regular-expression substitution.

SQLite✓ Tested
Arduino / CText & bounded buffers

Replace a token inside an Arduino String

Arduino / C: replace modifies all occurrences in the existing object.

Arduino / C✓ Tested