I have a text file with a lot of line's with this build.
10.1.1.77 - - [06/Jan/2011:07:55:36 1000] "GET /ELO/Language.do?language=Nl HTTP/1.0" 200 9584
Now I need to read the different items :
10.1.1.77 IP adres
- possible user name
- possible remote user
[06/Jan/2011:07:55:36 1000] date and hour of the request
"GET /ELO/Language.do?language=Nl HTTP/1.0" First line of the request
9584 Number of bytes
Now I whas planning to read the file using a scanner to read line by line. But I have no idea how to use different delimiters. I have looked around and found something about the use of regex but I don't understand the use.
Can anyone explain? Thx all
Because you mentioned you looked around but couldn't find tutorials of regex - here is the official tutorial for you:
Lesson: Regular Expressions (The Java™ Tutorials > Essential Classes)
Don't worry it is pretty straight-forward.