Re: extract a text, from a text file, that is contained between two strings
- From: Dave Miller <nonregistered@xxxxxxxxxxxx>
- Date: Fri, 30 May 2008 21:04:12 GMT
Giordano wrote:
Hi to everybody...
Can you tell me your best way to
extract a text, from a text file, that is contained between two
strings
example: we have a file which contains these words
<<
Ei fu. Siccome immobile,
dato il mortal sospiro,
stette la spoglia immemore
orba di tanto spiro,
...
I want extract that word contained between the 2 words "la" and
"immemore"
(this word will be "spoglia" at 3rd row, but I mean that more words
could be present & contained in the same 'range')
Thanks to everybody,
I will be happy to read your opinions.
:)
Bye
If your markers (la and immemore) are constant, read the file into a String, use indexOf(String) to find each and then substring the range in between.
--
Dave Miller
Java Web Hosting at:
http://www.cheap-jsp-hosting.com/
.
- Follow-Ups:
- References:
- Prev by Date: extract a text, from a text file, that is contained between two strings
- Next by Date: Re: extract a text, from a text file, that is contained between two strings
- Previous by thread: extract a text, from a text file, that is contained between two strings
- Next by thread: Re: extract a text, from a text file, that is contained between two strings
- Index(es):
Relevant Pages
|
|