summaryrefslogtreecommitdiff
path: root/devdocs/elisp/posix-regexps.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/posix-regexps.html
new repository
Diffstat (limited to 'devdocs/elisp/posix-regexps.html')
-rw-r--r--devdocs/elisp/posix-regexps.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/devdocs/elisp/posix-regexps.html b/devdocs/elisp/posix-regexps.html
new file mode 100644
index 00000000..989beca6
--- /dev/null
+++ b/devdocs/elisp/posix-regexps.html
@@ -0,0 +1,14 @@
+ <h3 class="section">POSIX Regular Expression Searching</h3> <p>The usual regular expression functions do backtracking when necessary to handle the ‘<samp>\|</samp>’ and repetition constructs, but they continue this only until they find <em>some</em> match. Then they succeed and report the first match found. </p> <p>This section describes alternative search functions which perform the full backtracking specified by the POSIX standard for regular expression matching. They continue backtracking until they have tried all possibilities and found all matches, so they can report the longest match, as required by POSIX. This is much slower, so use these functions only when you really need the longest match. </p> <p>The POSIX search and match functions do not properly support the non-greedy repetition operators (see <a href="regexp-special">non-greedy</a>). This is because POSIX backtracking conflicts with the semantics of non-greedy repetition. </p> <dl> <dt id="posix-search-forward">Command: <strong>posix-search-forward</strong> <em>regexp &amp;optional limit noerror count</em>
+</dt> <dd><p>This is like <code>re-search-forward</code> except that it performs the full backtracking specified by the POSIX standard for regular expression matching. </p></dd>
+</dl> <dl> <dt id="posix-search-backward">Command: <strong>posix-search-backward</strong> <em>regexp &amp;optional limit noerror count</em>
+</dt> <dd><p>This is like <code>re-search-backward</code> except that it performs the full backtracking specified by the POSIX standard for regular expression matching. </p></dd>
+</dl> <dl> <dt id="posix-looking-at">Function: <strong>posix-looking-at</strong> <em>regexp</em>
+</dt> <dd><p>This is like <code>looking-at</code> except that it performs the full backtracking specified by the POSIX standard for regular expression matching. </p></dd>
+</dl> <dl> <dt id="posix-string-match">Function: <strong>posix-string-match</strong> <em>regexp string &amp;optional start</em>
+</dt> <dd><p>This is like <code>string-match</code> except that it performs the full backtracking specified by the POSIX standard for regular expression matching. </p></dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/POSIX-Regexps.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/POSIX-Regexps.html</a>
+ </p>
+</div>