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/match-data.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 devdocs/elisp/match-data.html (limited to 'devdocs/elisp/match-data.html') diff --git a/devdocs/elisp/match-data.html b/devdocs/elisp/match-data.html new file mode 100644 index 00000000..159d2f02 --- /dev/null +++ b/devdocs/elisp/match-data.html @@ -0,0 +1,26 @@ +

The Match Data

Emacs keeps track of the start and end positions of the segments of text found during a search; this is called the match data. Thanks to the match data, you can search for a complex pattern, such as a date in a mail message, and then extract parts of the match under control of the pattern.

Because the match data normally describe the most recent search only, you must be careful not to do another search inadvertently between the search you wish to refer back to and the use of the match data. If you can’t avoid another intervening search, you must save and restore the match data around it, to prevent it from being overwritten.

Notice that all functions are allowed to overwrite the match data unless they’re explicitly documented not to do so. A consequence is that functions that are run implicitly in the background (see Timers, and Idle Timers) should likely save and restore the match data explicitly.

+ + + + + + + + + + + + + + + +
+

+ 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/Match-Data.html +

+
-- cgit v1.2.3