-
-
Save leejarvis/baa007793b683ce3c5ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
DATA.readlines.each do |line| | |
if (line =~ /start/) .. (line =~ /end/) | |
puts "between start and end: #{line}" | |
else | |
puts "not between start and end: #{line}" | |
end | |
end | |
__END__ | |
foo | |
bar | |
start | |
inside | |
blah | |
this is the end | |
baz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment