Search for a string in a file and append a line to the end of the file For exmaple you want to find all <a> tags inside a <Link> tag. <Link[^>]*><aNegative Lookahead