Results for “Regular expressions & URL encoding”
Small, practical examples. Search by task or narrow things down below.
Read named regex capture groups
JavaScript: Named groups make a fixed input format easier to inspect than numeric group positions.
JavaScript✓ Tested
Read named regex capture groups
TypeScript: Named groups make a fixed input format easier to inspect than numeric group positions.
TypeScript✓ Tested
Reorder captured text in a replacement
JavaScript: Use numbered replacement groups to rearrange a known two-part name.
JavaScript✓ Tested
Reorder captured text in a replacement
TypeScript: Use numbered replacement groups to rearrange a known two-part name.
TypeScript✓ Tested
Split text on several separator characters
JavaScript: A regex character class can recognize alternative simple delimiters.
JavaScript✓ Tested
Split text on several separator characters
TypeScript: A regex character class can recognize alternative simple delimiters.
TypeScript✓ Tested
Validate a whole ASCII identifier
JavaScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.
JavaScript✓ Tested
Validate a whole ASCII identifier
TypeScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.
TypeScript✓ Tested
Build a URL query string
Python: Use urlencode to percent-encode query parameter values correctly.
Python✓ Tested
Escape a single URL parameter value
PowerShell: EscapeDataString encodes one value without treating it as a complete URL.
PowerShell✓ Tested
Decode a form query parameter
Java: URLDecoder reverses form encoding and treats plus as a space.
Java✓ Tested
Encode a form query parameter
Java: URLEncoder uses application/x-www-form-urlencoded rules, including plus signs for spaces.
Java✓ Tested