Frage

I just installed and ran the pep8 Python style guide checker. I get a few errors and warnings. One of them is W291 trailing whitespace. My question is, how do I in IDLE search for line breaks (or tab indentations for that matter). I tried ctrl+f using the Regular expression option and searching for \n, but that doesn't work. What am I doing wrong?

Kindly delete this question, if it doesn't belong on stackoverflow, as it is not a programming question as such. Thanks.

War es hilfreich?

Lösung

After giving it a try, the regex \s+$ does work.

explanation: \s matches any single whitespace character. + makes it match a series of whitespace characters. $ matches the end of the line. So, we're matching a series of whitespace characters immediately before the end of the line.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top