user3024703
user3024703

Reputation: 23

Notepad ++ How to find lines with X spaces (not less and not more)

I need to find lines in notepad ++ with only X number of spaces - for example 3 spaces (not less and not more). Text in notepad include different languages like arabic ( الجديده) russian (моя собака) etc. I cant find any regex solution to bookmark all lines i need... Please help:)

Upvotes: 2

Views: 239

Answers (2)

Miko
Miko

Reputation: 135

Don't forget the space in front of {3}. Keep in mind that this only search for 3 spaces like you've asked, no other requirements are met.

 {3}

Upvotes: 1

Toto
Toto

Reputation: 91488

I'd do:

^(?:[^ ]* ){3}[^ ]*$

This will match lines that have exactly 3 spaces in them.

Upvotes: 4

Related Questions