fork download
  1. #!/bin/bash
  2. s="B-something
  3. B-something-something
  4. B-something_something
  5. B-something-something_something
  6. I-something
  7. I-something-something
  8. I-something_something
  9. I-something-something_something"
  10. LC_ALL=C sed 's/\([BI]\)-[a-zA-Z_-]\{1,\}/\1/g' <<< "$s"
Success #stdin #stdout 0s 4360KB
stdin
Standard input is empty
stdout
B
B
B
B
I
I
I
I