ignore specific data



Hi I need help. What I want to do is If I read a file with some text
content...
I would like to ignore a block of lines and consider the rest..
so if the block starts with

"start of block............."
fjesdgsdhfgdlgjklfjdgkd
jhcsdfskdlgjkljgkfdjkgj
"end of block"

I want to ignore this while processing the file .This block could
appear anywhere in the file.It could at the start or end or even middle
of file content.

Hope I'm clear...

somethin like

f = open("file")
clean_data = ignore_block(f)

here ignore_data should filter the block

def ignore_data(f):
.............................
return data # may be an array of remaining lines...

.



Relevant Pages

  • RE: Looking for formula index/match-type that returns an array
    ... Try Data | Filter from the menu ... "Tom" wrote: ... > looking for a formula that would give me the list (or array) of names that ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: move to front of array
    ... array = %w ... That certainly would work (assuming that only one element matches the ... def bubble_up! ... Prev by Date: ...
    (comp.lang.ruby)
  • Importing text file to array?
    ... I thought if I import text file directly to the array and then filter ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Reading data from a filtered list
    ... I need some brain surgery, or the answer to the following: ... I'd like to read two columns of data displayed by a filter into an array. ... Prev by Date: ...
    (microsoft.public.excel.programming)
  • Re: [bulk]: Re: Can this be usefull?
    ... > class RoundList < Array ... > def initialize ... Ralf ... Prev by Date: ...
    (comp.lang.ruby)