filtering repetitions of spaces
I have a string like this:
"some text with lots of spaces"
I want it to be changed to:
"some text with lots of spaces"
I know the object I want is regexp and I know that I need to say:
'Look for all spaces followed by any number of spaces and replace with one space'
but I can't seem to write it out correctly.
I had a look at this but still struggling. Can someone point me in the right direction?
Thanks.
That didn't work as the forum filters out repetitions on spaces anyway.
Look at this patch:
Cheers.
On 13 nov. 08, at 15:17, fairesigneaumachiniste wrote:
> That didn't work as the forum filters out repetitions on spaces
> anyway.
Something like that should do it.
ej
Thanks! That's great!
I also found that doing [fromsymbol] - [tosymbol] worked but definitely not the best way.
> That didn't work as the forum filters out repetitions on spaces
> anyway.
shortening multiple spaces into one is actually just a simple html feature, unless you explicitly write a "
Emmanuel Jourdan schrieb:
> Something like that should do it.
yes, why easy if you can have it complicated... ;-)
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Quote: jayrope wrote on Fri, 14 November 2008 01:56
----------------------------------------------------
> > That didn't work as the forum filters out repetitions on spaces
> > anyway.
>
> shortening multiple spaces into one is actually just a simple html feature, unless you explicitly write a "
when writing javascript (or any code actually) you should use a dedicated code editor to strip out unwanted carriage returns, line breaks, tabs, spaces, etc.
a normal text software (like word) will unintentionally create those while you type, unless you set it to plain text edit (.txt) without any further visual formatting options.
i guess you knew this already?
i can recommend bbedit strongly for this (on mac).
jrp