fork download
  1. #!/bin/bash
  2. perl -nle '/(some)(?:.*?number (\d+))?/ && print join("\n", $1, $2)' <<< "some text and number 18"
  3. perl -nle '/(some)(?:.*?number (\d+))?/ && print join("\n", $1, $2)' <<< "some other text"
Success #stdin #stdout 0s 5128KB
stdin
Standard input is empty
stdout
some
18
some