Oops, problem, earlier I said there would be pipes within the text but the program also seems to have problems when there is unclosed brackets or "+" found.. and they occur rather often :( I understand your code now but I don't know how I could fix this issue. I could easily just replace those characters but I need to keep the original file as is.