fork download
  1. example_header = <<-EXAMPLE
  2. -----------------
  3. ---| Example |---
  4. -----------------
  5. EXAMPLE
  6.  
  7. notes = <<-HTML
  8. Hello World
  9. #{example_header}
  10. Example Here
  11. HTML
  12.  
  13. puts notes.gsub(Regexp.new(Regexp.escape(example_header) + ".*", Regexp::MULTILINE), "")
Success #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
    Hello World