I would do it like this (code not tested, just my "process"):
Code:
huge_string_var varchar2(32000);
begin
fhandle := fopen( my_file );
while not feof loop
temp_var := fread( fhandle);
huge_string_var := huge_string_var || temp_var;
pos_v := instr( huge_string_var, 'search_string' );
if pos_v > 0 then
-- I found the string, so do something
-- next line is to continue the search for more matches, but if not necessary just exit
huge_string_var := substr( huge_string_v, pos_v + length( 'search_string' );
end if;
end loop;
end;
Reason for doing it this way, is because you never know where the input string will be broken up on the FREAD. Happy to explain further if you need.
JoeB