Search code examples
findnotepad++missing-datacpu-word

Find missing words in rows in Notepad++


I have a folder with 2 kind of sentences/rows. One that has < h1 > tag, and other doesn't. Like so:

< td class="articles">Mama< /td>
< td class="articles">< h1>Tata < /h1>< /td>

I want to find with Notepad++ only the rows that doesn't have the word < h1>

Does anybody know how to do this?


Solution

  • Use the find or replace window (ctrl+f) or (ctrl+h) and set it to use regular expressions.

    Now use the regex:

    (?-s)(?i)^(?:.(?!<(?: |\t)h1(?: |\t|>)))*$

    This will find any line that doesn't contain for example:

    • < h1 >
    • <h1 style="">
    • <H1 >