Hi Gato,
Could you resend your input, code and expected output?
The HTML tags makes it difficult to tell what tags you have in the input.
As I see it you wish to extract the first word, first word after a colon and the character contained in the first [] from each record, the following, iterating over a file should extract the terms you are looking for.