fork download
  1. #!/bin/bash
  2. fldrs="TINKER_more05_less23 TINKER_more23_less03 TINKER_more55_less218"
  3. rx='TINKER_more([[:digit:]]+)_less([[:digit:]]+)'
  4. for f in $fldrs; do
  5. if [[ "$f" =~ $rx ]]; then
  6. echo "TINKER_${BASH_REMATCH[1]}_${BASH_REMATCH[2]}"
  7. fi
  8. done
Success #stdin #stdout 0.01s 5456KB
stdin
Standard input is empty
stdout
TINKER_05_23
TINKER_23_03
TINKER_55_218