Results for “Regular expressions & URL encoding”
Small, practical examples. Search by task or narrow things down below.
Read a URL query parameter
Parse a URL with the standard JavaScript URL API.
JavaScript✓ Tested
Read a URL’s host and path
Read a URL’s host and path using a complete Go program with explicit sample inputs.
Go✓ Tested
Read fields captured by a Bash regular expression
Bash Scripts: BASH_REMATCH contains the full match followed by capture groups after a successful regex test.
Bash Scripts✓ Tested
Read the byte size of a regular file
C++: file_size reads filesystem metadata without loading file contents.
C++✓ Tested
Replace the URL of a configured remote
Git: set-url changes configuration without fetching or pushing any objects.
Git✓ Tested
Resolve a relative URL
Resolve a relative URL using a complete Go program with explicit sample inputs.
Go✓ Tested
Serialize successful controls for a URL-encoded request
jQuery: serialize includes named enabled controls and checked checkboxes.
jQuery✓ Tested
Supply a title and URL for link previews
HTML: Open Graph metadata describes a shared page without changing its visible content.
HTML✓ Tested
Use a literal value in a regular expression
PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.
PowerShell✓ Tested
Validate the shape of an absolute URL
HTML: A URL input checks syntax, not whether a resource exists or is safe.
HTML✓ Tested
Inspect components of a URI
Java: Use URI parsing instead of splitting a URL at punctuation manually.
Java✓ Tested
Build text incrementally with StringBuilder
C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.
C#✓ Tested