Hi,
Is there a way for file searching in which i can find a string which
occurs after certain interval again in the file?
The file that i'm dealing with is in GB's so the searching has to be
fast.
Knute Johnson - 13 Jul 2007 17:23 GMT
> Hi,
> Is there a way for file searching in which i can find a string which
> occurs after certain interval again in the file?
> The file that i'm dealing with is in GB's so the searching has to be
> fast.
Yes!

Signature
Knute Johnson
email s/nospam/knute/
Flo 'Irian' Schaetz - 13 Jul 2007 17:30 GMT
And thus spoke ruds...
> Is there a way for file searching in which i can find a string which
> occurs after certain interval again in the file?
> The file that i'm dealing with is in GB's so the searching has to be
> fast.
http://www.nist.gov/dads/
Have fun. You're probably searching for a text searching algorithm like
Boyer-Moore, but as long as the description is as vague as that, I can't
say which one will be the best.
Flo
Roedy Green - 13 Jul 2007 20:50 GMT
>http://www.nist.gov/dads/
>
>Have fun. You're probably searching for a text searching algorithm like
>Boyer-Moore, but as long as the description is as vague as that, I can't
>say which one will be the best.
see http://mindprod.com/jgloss/products.html#BOYER
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Flo 'Irian' Schaetz - 14 Jul 2007 00:56 GMT
And thus spoke Roedy Green...
> see http://mindprod.com/jgloss/products.html#BOYER
404
Andrew Thompson - 14 Jul 2007 05:11 GMT
>And thus spoke Roedy Green...
>
>> see http://mindprod.com/jgloss/products.html#BOYER
>
>404
I suspect Roedy actually meant..
<http://mindprod.com/products.html>, which leads to..
<http://mindprod.com/products1.html#BOYER>

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Roedy Green - 13 Jul 2007 17:46 GMT
>Hi,
>Is there a way for file searching in which i can find a string which
>occurs after certain interval again in the file?
>The file that i'm dealing with is in GB's so the searching has to be
>fast.
Do a read starting at the offset, reading the entire file into ram.
See http://mindprod.com/applet/fileio.html for how.
Then use String.indexOf or a regex search . See
http://mindprod.com/jgloss/regex.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com