D
Derek Smith
Hi All,
First off I want to say this list is very helpful and people are nice
and polite compared to many other email lists and forums I have been on
for years and years, notably the camel lists. Thank you!
Ok so I have a file where I am searching for the string "Jul 14.*" for
example using a regexp and this is working fine. However I have been
debating on how to move forward with what code, $. or tell with seek?
for each line in file
linenumber = $. if /^string/
end
for each line in file
linenumber = tell line if /^string/
end
Will either of the above pseudo-code work?
seek to linenumber and add 1
start re-reading at linenumber+1 and store data until EOF.
Please help and or provide sample code?
thank you
First off I want to say this list is very helpful and people are nice
and polite compared to many other email lists and forums I have been on
for years and years, notably the camel lists. Thank you!
Ok so I have a file where I am searching for the string "Jul 14.*" for
example using a regexp and this is working fine. However I have been
debating on how to move forward with what code, $. or tell with seek?
for each line in file
linenumber = $. if /^string/
end
for each line in file
linenumber = tell line if /^string/
end
Will either of the above pseudo-code work?
seek to linenumber and add 1
start re-reading at linenumber+1 and store data until EOF.
Please help and or provide sample code?
thank you