Function: erc--parse-nuh

erc--parse-nuh is a byte-compiled function defined in erc.el.gz.

Signature

(erc--parse-nuh STRING)

Documentation

Match STRING against erc--parse-user-regexp-pedantic.

Return nil or matching groups representing nick, login, and host, any of which may be nil. Expect STRING not to contain leading prefix chars. Return an empty nick component to indicate further processing is required based on context. Interpret a lone token lacking delimiters or one with only a leading "!" as a host.

See associated unit test for precise behavior.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--parse-nuh (string)
  "Match STRING against `erc--parse-user-regexp-pedantic'.
Return nil or matching groups representing nick, login, and host,
any of which may be nil.  Expect STRING not to contain leading
prefix chars.  Return an empty nick component to indicate further
processing is required based on context.  Interpret a lone token
lacking delimiters or one with only a leading \"!\" as a host.

See associated unit test for precise behavior."
  (when (string-match erc--parse-user-regexp-pedantic string)
    (list (match-string 1 string)
          (match-string 2 string)
          (match-string 3 string))))