/hello/{found_hello=1;next} found_hello || /bar/{print;found_hello=""}
hello foo needed bar blah blah bar hello foo needed bar blah hello foo needed hello foo needed bar blah
needed bar bar needed bar needed needed bar
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!