unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Match empty string at begin/end of symbol
@ 2018-07-04 18:43 Joe Riel
  2018-07-04 19:21 ` Noam Postavsky
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joe Riel @ 2018-07-04 18:43 UTC (permalink / raw)
  To: Help GNU Emacs

The regular expressions '\_<' and '\_>'
seem to be broken in Emacs 25.1.1.  Consider

(let ((str "3+ab"))
  (and (string-match "\\<[a-zA-Z][a-zA-Z0-9]*" str)
       (match-string 0 str)))
 
That returns "ab", as expected.  Change the "\\<" to "\\_<"
and it no longer matches.  Why not?

(let ((str "3+ab"))
  (and (string-match "\\_<[a-zA-Z][a-zA-Z0-9]*" str)
       (match-string 0 str)))

-- 
Joe Riel




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-04 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04 18:43 Match empty string at begin/end of symbol Joe Riel
2018-07-04 19:21 ` Noam Postavsky
2018-07-04 19:22 ` Eli Zaretskii
2018-07-04 19:37   ` Joe Riel
2018-07-04 19:25 ` Teemu Likonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).