From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/rx-functions.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 devdocs/elisp/rx-functions.html (limited to 'devdocs/elisp/rx-functions.html') diff --git a/devdocs/elisp/rx-functions.html b/devdocs/elisp/rx-functions.html new file mode 100644 index 00000000..cfe91f13 --- /dev/null +++ b/devdocs/elisp/rx-functions.html @@ -0,0 +1,19 @@ +

Functions and macros using rx regexps

Macro: rx rx-form… +
+

Translate the rx-forms to a string regexp, as if they were the body of a (seq …) form. The rx macro expands to a string constant, or, if literal or regexp forms are used, a Lisp expression that evaluates to a string. Example:

(rx (+ alpha) "=" (+ digit))
+  ⇒ "[[:alpha:]]+=[[:digit:]]+"
+
+
+
Function: rx-to-string rx-expr &optional no-group +
+

Translate rx-expr to a string regexp which is returned. If no-group is absent or nil, bracket the result in a non-capturing group, ‘\(?:…\)’, if necessary to ensure that a postfix operator appended to it will apply to the whole expression. Example:

(rx-to-string '(seq (+ alpha) "=" (+ digit)) t)
+  ⇒ "[[:alpha:]]+=[[:digit:]]+"
+
+

Arguments to literal and regexp forms in rx-expr must be string literals.

+
+

The pcase macro can use rx expressions as patterns directly; see rx in pcase.

For mechanisms to add user-defined extensions to the rx notation, see Extending Rx.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Rx-Functions.html +

+
-- cgit v1.2.3