help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [SOLVED] Re: (rx regexp to remove space and new lines


From: Michael Heerdegen
Subject: Re: [SOLVED] Re: (rx regexp to remove space and new lines
Date: Thu, 15 Sep 2022 04:28:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jean Louis <bugs@gnu.support> writes:

> > (rx blank) might be the better choice. Adding CR and LF to the
> > puzzle, I'd use (rx (any "\n\r" blank))
>
> Thanks, I have tried it here:
>
> (defun rcd-string-clean-whitespace (s)
>   "Return trimmed string S after cleaning whitespaces."
>   (replace-regexp-in-string 
>    (rx (one-or-more blank))

The newline is missing.

Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]