Re: bug#68401: 30.0.50; ERC 5.6-git: `erc-cmd-GMSG', `erc-cmd-AMSG', `erc-cmd-GME', `erc-cmd-AME'. 2nd attempt
Emanuel Berg <[email protected]> Mon, 22 Jan 2024 22:05:21 +0100
| Newsgroups | gmane.emacs.erc.general,gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Andreas Schwab wrote:
>> (defun erc-drop-leading-whitespace (str)
>> (if (string-match " \\(.*\\)" str)
>> (match-string 1 str)
>> str) )
>
> (erc-drop-leading-whitespace "foo bar") => "bar"
Ah, forgot the ^ and $, thank you.
(defun erc-drop-leading-whitespace (str)
(if (string-match "^ \\(.*\\)$" str)
(match-string 1 str)
str) )
--
underground experts united
https://dataswamp.org/~incal