[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RegExp.Replace
[Thread Prev] | [Thread Next]
- Subject: Re: RegExp.Replace
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Tue, 2 Dec 2025 11:28:50 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 02/12/2025 à 08:13, CD a écrit :
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
You must use the 'RegExp.Greedy' compilation option, otherwise '\\s+' only matches one space.
Regards, -- Benoît Minisini.
| Re: RegExp.Replace | CD <dessere.claude@xxxxxx> |
| RegExp.Replace | CD <dessere.claude@xxxxxx> |