fork download
  1. #!/bin/bash
  2. s='---------
  3. foo bar
  4. more foo bar
  5. ---------'
  6. grep -Poz '(?s)-\R\K.*(?=\R-)' <<< "$s"
Success #stdin #stdout 0s 4404KB
stdin
Standard input is empty
stdout
foo bar
more foo bar