|
From: | Jean Louis |
Subject: | [SOLVED] Re: (rx regexp to remove space and new lines |
Date: | Mon, 12 Sep 2022 13:43:11 +0300 |
User-agent: | Mutt/+ () (2022-06-11) |
If there is better way let me know. (defun rcd-string-clean-whitespace (s) "Return trimmed string S without new lines and whitespaces." (replace-regexp-in-string (rx (one-or-more (or "\n" (any whitespace)))) " " (string-trim s))) -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
[Prev in Thread] | Current Thread | [Next in Thread] |