Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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?
share|improve this answer

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}.
share|improve this answer
1  
No, \s is "always" a character class. So [\s] is the same as \s. – Ouki Feb 14 '12 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .