FIND YOUR NEXT FEW LINES

Results for “version”

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

46 snippets foundClear filters
PythonStrings & dates

Extract numbers from text

Find all runs of ASCII digits in a string and convert the matches to integers.

regex✓ Tested
PythonCollections

Filter a list with a condition

Build a new list containing only the values that satisfy a condition using a list comprehension.

list✓ Tested
PowerShellStructured formats & encodings

Handle a malformed JSON document

PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.

PowerShell✓ Tested
PowerShellFunctions & control

Handle a terminating error

Catch conversion failures and produce a clear fallback.

try catch✓ Tested
PythonStrings & dates

Join strings with a separator

Combine a list of strings into one readable string with a separator between each item.

string✓ Tested
PythonFiles & paths

List files in a folder

List the names of regular files in a folder in alphabetical order, excluding subdirectories.

directory✓ Tested
GitTags & repository configuration

List release tags matching a pattern

Git: Use a tag pattern and version-aware sorting for release labels.

Git✓ Tested
PythonCollections

Merge two dictionaries

Combine two dictionaries into a new dictionary. When a key appears in both inputs, the value from the second dictionary wins.

dictionary✓ Tested
PythonJSON & CSV

Parse a JSON string

Convert a JSON string into a Python dictionary and read values by key.

json✓ Tested
PowerShellDates & numeric validation

Parse an integer without throwing on invalid input

PowerShell: TryParse reports conversion success separately from its output value.

PowerShell✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
PythonJSON & CSV

Read a JSON file

Load a JSON document from disk into Python objects using an explicitly selected text encoding.

json✓ Tested