fork download
  1. #!/bin/bash
  2. s='device `canon_dr:libusb:003:004'"'"' is a CANON DR-C125 scanner'
  3. grep -Po "\`\\K[^']+" <<< "$s"
  4. awk -F"[\`']" '{print $2}' <<< "$s"
Success #stdin #stdout 0.01s 5264KB
stdin
Standard input is empty
stdout
canon_dr:libusb:003:004
canon_dr:libusb:003:004