fork download
  1. s = <<'EOF'
  2. [Hello] How are you
  3. Doing
  4. Hope you have a nice day!
  5. [goodbye] cya
  6. Take care
  7. EOF
  8. p s.lines.grep(/^(?!\[.*?])/)
Success #stdin #stdout #stderr 0s 28216KB
stdin
Standard input is empty
stdout
["Doing\n", " Hope you have a nice day!\n", "Take care\n"]
stderr
prog.rb:8: warning: regular expression has ']' without escape: /^(?!\[.*?])/
prog.rb:8: warning: regular expression has ']' without escape: /^(?!\[.*?])/