[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RegExp.Replace


Thank you all for your replies. 

The loops were already in the store. 

What I was looking for in vain was Mayost Sharon's solution. 

I'll also try Benoît's solution. 

Many thanks to you all.

Gambas it's Classe
Gambas c'est Classe



Le mardi 02 décembre 2025 à 12:22 +0200, Mayost Sharon a écrit :
> Do you want to leave just one space character?
> I did that and it worked fine two +
> 
> markers
> 
> s = RegExp.Replace(s, "\\s++", " ")
> 
> ---------- Original Message -----------
> 
> 
> From: CD <dessere.claude@xxxxxx>
> To: GambasMailingList <user@xxxxxxxxxxxxxxxxxxxxxx>
> 
> 
> Sent: Tue, 02 Dec 2025 08:13:52 +0100
> Subject: RegExp.Replace
> 
> > Hello,
> > 
> > I have a
> 
> string like this:
> > 
> > Dim s As String = "A B C D E"
> > 
> > s = RegExp.Replace(s, "\\s+",
> 
> " ")
> > 
> > Print s
> > 
> > I would like to get "A B C D E"
> > 
> > What should I write in the
> 
> Pattern string?
> > 
> > I've tried many things, without success.
> > 
> > So what should I
> 
> change to get the desired result?
> > 
> > Regards
> ------- End of Original Message -------
> 
> 


References:
RegExp.ReplaceCD <dessere.claude@xxxxxx>
Re: RegExp.Replace"Mayost Sharon" <sharon@xxxxxxxxx>