fork(1) download
  1. #!/bin/bash
  2. test='test="+----------+ | count(4) | +----------+ | 0 | +----------+"'
  3. pattern='\|\s([0-9]+)\s\|'
  4. if [[ "$test" =~ $pattern ]]
  5. then
  6. echo "${BASH_REMATCH[1]}"
  7. fi
Success #stdin #stdout 0s 4456KB
stdin
Standard input is empty
stdout
0