FIND YOUR NEXT FEW LINES

Results for “Regular expressions & URL encoding”

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

141 snippets foundClear filters
JavaScriptFiles & async

Read a URL query parameter

Parse a URL with the standard JavaScript URL API.

JavaScript✓ Tested
GoHTTP & URLs

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
Bash ScriptsText parsing & arithmetic

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
C++Filesystem operations

Read the byte size of a regular file

C++: file_size reads filesystem metadata without loading file contents.

C++✓ Tested
GitRemotes & additional checkouts

Replace the URL of a configured remote

Git: set-url changes configuration without fetching or pushing any objects.

Git✓ Tested
GoHTTP & URLs

Resolve a relative URL

Resolve a relative URL using a complete Go program with explicit sample inputs.

Go✓ Tested
jQueryForm serialization & state

Serialize successful controls for a URL-encoded request

jQuery: serialize includes named enabled controls and checked checkboxes.

jQuery✓ Tested
HTMLMetadata & document links

Supply a title and URL for link previews

HTML: Open Graph metadata describes a shared page without changing its visible content.

HTML✓ Tested
PowerShellStrings & literal text

Use a literal value in a regular expression

PowerShell: Regex.Escape prevents a literal dot or other metacharacter from changing the match.

PowerShell✓ Tested
HTMLInput constraints

Validate the shape of an absolute URL

HTML: A URL input checks syntax, not whether a resource exists or is safe.

HTML✓ Tested
JavaEncoding & structured values

Inspect components of a URI

Java: Use URI parsing instead of splitting a URL at punctuation manually.

Java✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested