On Thursday 20 August 2009 15:04:04 Harold Fuchs wrote:
> 2009/8/20 Jonathan Kaye <[email protected]>
>
> > Hi all,
<<<SNIPPED by Pradeep>>>
> > All suggestions are welcome.
> > TIA
> > Jonathan
>
> In the Find & Replace dialogue click "More options" and then check
> Regular Expressions. Now, in the Find box, enter " *" without the
> quotes. That is 2 spaces followed by an asterisk. Enter a single
> space into the "Replace with" box and click "Replace all". That
> should do it. What you have done is replaced "a single space
> followed by zero or more spaces" with "a single space". Read up
> about Regular Expressions for details. Your time doing that will be
> well spent :-)
Jonathan,
In the Search and Replace box, choose the "More" button, and place a
check mark against Regular Expressions. Then in the "Find" field, put
in the following WITHOUT the double quotes : " "{2,}
In the Replace field, put in, again, without the double quote, " "
The RE translates to - find one space, at least twice in succession.
If you knew the MAXIMUM number of spaces, then, you could specify that
maximum number after the "2," thus : " "{2,10}
The Replace pattern is simple - just a single space.
This should work (limited testing shows it does) - it is not to say
that the method suggested by Harold does not...and therefore, Harold,
my apologies!
--
Pradeep V S
on 20 Aug 2009, Thursday, IST (which is GMT +05:30)
-----------------------------------------------------------------------
Do not be desirous of having things done quickly.
Do not look at small advantages.
Desire to have things done quickly
prevents their being done thoroughly.
Looking at small advantages
prevents great affairs from being accomplished.
-- Confucious
Chinese Philosopher and Teacher, circa 551 BC - circa 479 BC
-----------------------------------------------------------------------
Signature block is /auto/ /generated/ from the Unix utility *fortune*
fortune run at 16:30 IST on 20 Aug 2009, Thursday
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]