fork download
  1. #!/bin/bash
  2. s='URL:http://t...content-available-to-author-only...d.internal .Response code: 503> '
  3. sed 's~\(https\{0,1\}://\)[^.]\{1,\}~\1hostname~' <<< "$s"
  4. sed -E 's~(https?://)[^.]+~\1hostname~' <<< "$s"
Success #stdin #stdout 0s 4492KB
stdin
Standard input is empty
stdout
URL:http://h...content-available-to-author-only...d.internal .Response code: 503> 
URL:http://h...content-available-to-author-only...d.internal .Response code: 503>