fork download
  1. #!/bin/bash
  2. s='23353_test.txt'
  3. grep -oP '(?<=_).*(?=\.)' <<< "$s"
  4. sed -n 's/.*_\(.*\)\..*/\1/p' <<< "$s"
Success #stdin #stdout 0.01s 5444KB
stdin
Standard input is empty
stdout
test
test