Find all HTML Style Comment Blocks (?s)<!--.*?--> The second question mark makes it non-greedy, and the first (?s) is the dotall identifier to include newlines in search.