From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joe Riel Newsgroups: gmane.emacs.help Subject: Match empty string at begin/end of symbol Date: Wed, 4 Jul 2018 11:43:46 -0700 Message-ID: <20180704114346.73df0142@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1530729734 10389 195.159.176.226 (4 Jul 2018 18:42:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Jul 2018 18:42:14 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 04 20:42:09 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1famjB-0002cm-Pb for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2018 20:42:09 +0200 Original-Received: from localhost ([::1]:48824 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1famlJ-00026N-1z for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2018 14:44:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1famku-00026G-2a for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 14:43:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1famkq-00023O-TL for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 14:43:56 -0400 Original-Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.231]:58725 helo=cdptpa-cmomta01.email.rr.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1famkq-00022L-OF for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 14:43:52 -0400 Original-Received: from gauss ([75.80.191.41]) by cmsmtp with SMTP id ambgfVJIOym6vambjfZkAq; Wed, 04 Jul 2018 18:34:28 +0000 X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) X-CMAE-Envelope: MS4wfKHIoxA0woVSuP5ybIpstxKQQwITokw0+ur2Ee3BdMjxmB7VMonudtTZTiYJTvQKS1IWN+DZfM6aCuays1iwLciEJgSauPJGQyLxqJhNzDL8wbPN5+Rf y0RSOuyxpR+NznWtBs7rbucjTvdjBk2iNyDapqUuul4/MYi8lT1+eATx X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 107.14.166.231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117346 Archived-At: 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