fork download
  1. #!/bin/bash
  2. # your code goes here
  3. echo "* apple * * orange tasty * * banana * * grape NOT *" | grep -Po "\*[^*]* NOT [^*]*\*(*SKIP)(*FAIL)|\*\s*\K\w+(?: \w+)*(?= \*)"
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
apple
orange tasty
banana