2

I want to find two or more (max 9) white-space characters and replace it with newlines.

My RegEx syntax is as follows:

[\s]{2,9}

However, Notepad++'s RegEx doesn't seem to work with curly braces. When I use plugin RegEx helper, it highlights proper values, using above syntax. It doesn't, however, replace the found values.

What am I doing wrong?

4

I found no reference to curly-based occurence numbering in Notepad++ regexp documentation.

Then you should to it the hard way:

\s\s\s?\s?\s?\s?\s?\s?\s?
1

Notepad++ does not support explicit quantifiers:

You can, however, use the following quantifiers:

  • k*, which is equivalent to k{0,}.
  • k+, which is equivalent to k{1,}.
  • k?, which is equivalent to k{0,1}.
1
  • 1
    No, \s is "always" a character class. So [\s] is the same as \s. – Ouki Feb 14 '12 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.