From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: bug in elisp... or in elisper??? Date: Wed, 23 Mar 2011 18:01:16 +1100 Organization: Unlimited download news at news.astraweb.com Message-ID: <87mxkm9v7n.fsf@puma.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300866073 713 80.91.229.12 (23 Mar 2011 07:41:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2011 07:41:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 23 08:41:10 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2Ign-0008MV-LL for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Mar 2011 08:41:09 +0100 Original-Received: from localhost ([127.0.0.1]:46688 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2Igm-0007UK-Kr for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Mar 2011 03:41:08 -0400 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!newsfeed20.multikabel.net!multikabel.net!newsfeed10.multikabel.net!news.astraweb.com!border5.a.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:38G//8XlteHtw7eauQi8ieI8Qbk= Original-Lines: 63 Original-NNTP-Posting-Host: e53a4e49.news.astraweb.com Original-X-Trace: DXC=0aFYTZTYQVG0O6dPiicVTIL?0kYOcDh@JN7:H2`MmAUC7hYWEOcT^fG]G; 2>V^?kWCCAkl5c@XgkNmF6^I1[hCYCHT9Q3QiJZfC Original-Xref: usenet.stanford.edu gnu.emacs.help:186196 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80331 Archived-At: ken writes: > Fellow elispers, > > Something seems to be amiss in the search syntax here: > > (setq aname-re-str > "\\(\\(.\\|\n\\)*?\\) \\|\t\\|\n\\)*?\\)>" ) > > ;;Here's a function to use the above RE and return diagnostics: > > (defun test-aname-search () > (interactive) > (re-search-forward aname-re-str) > (message "1: \"%s\" 2: \"%s\" 3: \"%s\" 4: \"%s\" 5: \"%s\" 6: \"%s\" > 7: \"%s\" 8: \"%s\"" > (match-string 1) > (match-string 2) > (match-string 3) > (match-string 4) > (match-string 5) > (match-string 6) > (match-string 7) > (match-string 8))) > > > Here are some strings to search on: > >

Any Text-- > Hot Stuff

> >

class="title" >> name="heres-a-name" >> > the>

> > >

Any Text-- > Hot Crud

> > > The problem is that the 5th match-string should be either empty or > whitespace. But it consistently contains the last character of of the > 4th match-string. And these two matches are separated by the literal > character string, " > > Wishing I hadn't quit beer, > ken I don't think your re is matching what you think it is. Strong recommend you try using re-builder as this will give you a visual representation of what your re is matching (with different colours representing the various match groups). Tim -- tcross (at) rapttech dot com dot au