Re: [users] Regular expression for several spaces that does not match a single space

2005-01-30 Thread kevin johnston
Don't put the question marks in the expression. What you want is just [:space:][:space:][:space:][:space:][:space:][:space:][:space:][:space:]. A question mark means "match this character 0 times or 1 time only". What is happening for you is that for every space character in your document, one

Re: [users] Regular expression for several spaces that does not match a single space

2005-01-26 Thread Mark Kirchner
On Wednesday, January 26, 2005, 3:00:30 PM, Mark Kirchner wrote: >> [:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]? > > [:space:]? means: One OR zero spaces (because of the "?"). So the > complete expression will match anything from 0 to 8 spaces. Ugh, copy & paste error: Th

Re: [users] Regular expression for several spaces that does not match a single space

2005-01-26 Thread Mark Kirchner
On Wednesday, January 26, 2005, 2:38:53 PM, David Teague wrote: > I want to replace the leading 8 spaces with 4. If I use eight of the > regular expression [:space:]?, as > > [:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]? [:space:]? means: One OR zero spaces (because of the

Re: [users] Regular expression for several spaces that does not match a single space

2005-01-26 Thread Cyrille Moureaux
Hi David, I want to replace the leading 8 spaces with 4. If I use eight of the regular expression [:space:]?, as [:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]? In regular expressions, normally the ? cardinality means 0 or 1 occurrence, so that expression would match any num

[users] Regular expression for several spaces that does not match a single space

2005-01-26 Thread David Teague
I have some C++ code with annoyingly many spaces of indentation. I want to replace the leading 8 spaces with 4. If I use eight of the regular expression [:space:]?, as [:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]?[:space:]? and replace with say four of them, the find button in