fork download
  1. #!/bin/bash
  2. s='BUG-KEYWORD-BUG-101
  3. ABC-10
  4. DEF-10327
  5. Output is referred in ABC-1043
  6. Please refer DEF-11234'
  7. grep -oE '[[:alpha:]]+-[0-9]+' <<< "$s"
Success #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
BUG-101
ABC-10
DEF-10327
ABC-1043
DEF-11234