I need a bit of help parsing a text file in Java as its been a while since I have done it. I have a text file that contains lines of input like the following.
write[12,43]
write[15,43]
read[12,67]
commit[12]
abort[15]
I need to set 3 variables. One as the operation name part (write, commit etc), one for the first number and one for the second (when required).
Could someone please point me in the right direction as to how to do this? I know it could be done much easier using PERL but it must be done in JAVA.
Thanks