Results for “Regular expressions & URL encoding”
Small, practical examples. Search by task or narrow things down below.
Replace all matching text
Normalize repeated whitespace with a regular expression.
regexp_replace✓ Tested
Replace NULL in a result
Choose a fallback for a missing value.
COALESCE✓ Tested
Split a list into fixed-size batches
Python: Slice a sequence at regular offsets; the final batch can be smaller.
Python✓ Tested
Split text on a simple delimiter
PowerShell: The split operator uses a regular expression; this delimiter has no special regex meaning.
PowerShell✓ Tested
Sum values per category
Calculate a grouped total.
SUM✓ Tested
Validate a complete identifier
Java: String.matches requires the regular expression to match the entire input.
Java✓ Tested
Write a UTF-8 file
Write a Java string to a file using an explicit text encoding.
Java✓ Tested
Write and read binary bytes
Java: Use the byte-oriented Files methods when text encoding should not be involved.
Java✓ Tested
Write and read raw bytes
C#: Use the byte-oriented file APIs when no text encoding should be applied.
C#✓ Tested