Results for “capture”
Small, practical examples. Search by task or narrow things down below.
Reorder captured text in a replacement
TypeScript: Use numbered replacement groups to rearrange a known two-part name.
TypeScript✓ Tested
Reorder fields with a capture group
Linux Commands: Use extended regular expressions and backreferences to rearrange a known format.
Linux Commands✓ Tested
Replace text using captured regex groups
C++: Numbered replacement groups can rearrange a known two-part name.
C++✓ Tested
Extract named regex fields
Python: Use named capture groups to parse a known date-shaped identifier.
Python✓ Tested
Observe an exception from an asynchronous task
C++: Calling get rethrows an exception captured by the future.
C++✓ Tested
Preserve a failure status while an EXIT trap runs
Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.
Bash Scripts✓ Tested
Read output from a completed container
Retrieve the stdout captured by Docker.
logs✓ Tested
Read values generated by INSERT
Capture an IDENTITY value with OUTPUT.
OUTPUT✓ Tested
Return text from a shell function
Capture a function’s output with command substitution.
function✓ Tested
Stop a child process created by the script
Bash Scripts: Send a signal only to the captured PID of the script’s own child and wait for it to exit.
Bash Scripts✓ Tested