R
Ron Coutts
This should be an easy question for Ruby-heads but I can't seem to
easily find the answer. I need to extract multiple lines from a file
where the lines are delimited by some other text. For example, with
file contents as shown below I'd like to extract the content between the
BEGIN_FOO and END_FOO lines. Can anyone tell me how to do that?
BEGIN_FOO
Some foo stuff here.
More foo stuff.
END_FOO
I've done this before in Perl (can't remember the syntax) so I'm
thinking it should be possible in Ruby.
Ron
easily find the answer. I need to extract multiple lines from a file
where the lines are delimited by some other text. For example, with
file contents as shown below I'd like to extract the content between the
BEGIN_FOO and END_FOO lines. Can anyone tell me how to do that?
BEGIN_FOO
Some foo stuff here.
More foo stuff.
END_FOO
I've done this before in Perl (can't remember the syntax) so I'm
thinking it should be possible in Ruby.
Ron