Q:

Regular Expression: Match lines not starting with 32 spaces in Notedpad++

In Notepad++, I'm trying to match lines not starting with 32 consecutive spaces.
I already have the regex that matches lines starting with 32 consecutive spaces: ^ {32}.*$
I tried with ^[^ {32}].*$ and ^[^( {32})].*$ with the same wrong result, doesn't match lines with only 24 spaces for example.

A:

Everything inside your straight brackets form a single character class, so
[^ {32}]

matches (not) any of the individual characters , {, 3, 2, and }. The "(not)" is because the first character is a negation. (It does not help.)
What you are looking for is a Negative Lookahead:
^(?! {32}).+$

This tests each line and selects it if it is not followed by at least 32 spaces. To match not only exactly 32 spaces and not more, use another lookahead inside the first one:
^(?! {32}(?! )).+$

