Sujet : Re: Remove new line char
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tclDate : 19. Mar 2025, 21:47:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vrfag4$1l3ku$1@dont-email.me>
References : 1 2 3
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
alexandru <
alexandru.dadalau@meshparts.de> wrote:
Well, that's what my orginal reexp does. No effect.
No, it Harold's is not identical to your regexp.
Your original (since you did not quote anything):
regsub {[\r\n]+$} $text ""
If this is exactly what you are doing, this replaces a run of \r or \n
characters that also occur adjacent to the end of the string.
Harold suggested:
string map "\n {} \r {}" $text
This deletes every occurrence of \n and every occurrence of \r,
anywhere in the string.
Which is very different.