Reading specific portions of text file
Hey Java experts!
I just had a quick question.
I spent a lot of time looking around, but I can't find a real answer. I'm looking for a way to parse a (very) long text file and pull a piece of it and write it to a next text file.
I found that I could replace pieces, and that worked to an extent (by replacing the parts of the lines I didn't need with a blank to remove them).
The file has lines that look like this:
2010-11-09 09:55:15:691 - () Unable to lock Claim=10XXX30E0XXXX, Error Code=60016
Some lines don't have claim numbers on them at all. What I want to do is extract just that claim number, nothing else. I want a new file that lists just the claim numbers.
I suppose what I'm trying to find out is if Java has some way to look at a line and say something like "ok, here's the word 'claim,' now I want to extract the 12 characters immediately following it."
As always, thank you all for your time and help <3.