Rex,
Would you explain your regexp, please? Also, what do you think about this:
$string =~ s/([^\s])\s([^\s])/$1$2/g;
Thanks,
Ahmed
On Wed, 28 Nov 2001 [EMAIL PROTECTED] wrote:
> Let me give it a shot...How about this?
> --Rex
>
> $string = "I want to delete all this spaces, but this";
> $string =~ s/\s{1}(?=\w)//g;
> print $string;
>
>
>
> > -----Original Message-----
> > From: Pedro A Reche Gallardo [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, November 28, 2001 1:06 PM
> > To: [EMAIL PROTECTED]
> > Subject: deleting white spaces
> >
> >
> > Hi all, I would like to delete all single white spaces from a string
> > without deleting concatenated white spaces. An example:
> > $string= "I want to delete all this spaces, but this"
> >
> > The result would be:
> >
> > $string = "Iwanttodeleteallthisspacesbut this"
> >
> > Any idea welcomed.
> >
> > Cheers
> >
> >
> > **************************************************************
> > *************
> > PEDRO A. RECHE , pHD TL: 617 632 3824
> > Dana-Farber Cancer Institute, FX: 617 632 4569
> > Harvard Medical School, EM: [EMAIL PROTECTED]
> > 44 Binney Street, D1510A, EM: [EMAIL PROTECTED]
> > Boston, MA 02115 URL: http://www.reche.org
> > **************************************************************
> > *************
> >
> >
> >
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]