1 2 3 4 5 6 7
/<h1>.+/ { # Takes everything between <h1> and </h1> in the first # <h1> occurence. h = index($0, "<h1>") print substr($0, h, index($0, "</h1") - h) exit }