emacs-devel
[Top][All Lists]
Advanced

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

Re: cond*


From: Richard Stallman
Subject: Re: cond*
Date: Tue, 02 Jan 2024 23:13:58 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > ‘(rx RX-EXPR...)’
  >      Matches strings against the regexp RX-EXPR..., using the ‘rx’
  >      regexp notation (*note Rx Notation::), as if by ‘string-match’.

That seems natural enough, though I don't recall the details of `rx'.
(I have never used it myself.)  But I need to underdstand this too:

       > In addition to the usual ‘rx’ syntax, RX-EXPR... can contain the
       > following constructs:

       > ‘(let REF RX-EXPR...)’
            > Bind the symbol REF to a submatch that matches RX-EXPR....
            > REF is bound in BODY-FORMS to the string of the submatch or
            > ‘nil’, but can also be used in ‘backref’.

I don't understand that description.  I don't see what this construct
would look like inside of an (rx ...) pattern, let alone what it would
mean.

Can you show me a complete pattern example using (rx...) and this, and
explain it?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

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