From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Withers Newsgroups: gmane.emacs.help Subject: Re: Perl, etc has these "?"-prefix modifiers/codes/whatever. Precisely which does emacs have (and NOT have)? Date: Thu, 18 Feb 2010 18:36:54 -0800 Message-ID: <1266547014.7034.106.camel@Frank-Brain> References: <877hqaojg9.fsf@galatea.lan.informatimago.com> <873a0ynz99.fsf@galatea.lan.informatimago.com> <87r5oi11bb.fsf@galatea.lan.informatimago.com> Reply-To: grayarea@reddagger.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1266547059 24684 80.91.229.12 (19 Feb 2010 02:37:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2010 02:37:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Pascal J. Bourguignon" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 19 03:37:37 2010 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 1NiIkK-0001G1-DB for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Feb 2010 03:37:36 +0100 Original-Received: from localhost ([127.0.0.1]:38369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiIkJ-0008Cs-JA for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Feb 2010 21:37:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NiIjw-0008Aq-CD for help-gnu-emacs@gnu.org; Thu, 18 Feb 2010 21:37:12 -0500 Original-Received: from [140.186.70.92] (port=35522 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NiIjr-00087V-N5 for help-gnu-emacs@gnu.org; Thu, 18 Feb 2010 21:37:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NiIjm-0006Pi-Sb for help-gnu-emacs@gnu.org; Thu, 18 Feb 2010 21:37:07 -0500 Original-Received: from assert.reddagger.org ([66.211.107.215]:37473 helo=mail.reddagger.org) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NiIjm-0006Pa-Nk for help-gnu-emacs@gnu.org; Thu, 18 Feb 2010 21:37:02 -0500 Original-Received: by mail.reddagger.org (Postfix, from userid 1007) id 55C7D18A4156; Thu, 18 Feb 2010 18:37:05 -0800 (PST) Original-Received: from [192.168.1.101] (c-67-164-33-174.hsd1.ca.comcast.net [67.164.33.174]) by mail.reddagger.org (Postfix) with ESMTP id 1A80B18A411A; Thu, 18 Feb 2010 18:37:00 -0800 (PST) In-Reply-To: <87r5oi11bb.fsf@galatea.lan.informatimago.com> X-Mailer: Evolution 2.24.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:71944 Archived-At: On Fri, 2010-02-19 at 02:06 +0100, Pascal J. Bourguignon wrote: > > One difficulty when you try to extend regular expression is that the > time and space complexity of matching such an extended regular > expression easily becomes exponential. In these cases, it may be easier > to write a parser, than to try to force it thru regular expressions, > both for the programmer's brain and for the CPU processor... Sure exponential backtracking can happen, you can write checks for common cases and aborts, but let's say you don't. Who cares? I can write things that go exponential for memory or clock ticks in any of the languages I am even trivially familiar with. > Otherwise, people will do anything they want to do, theory and > precendent nonobstant. This only demonstrate the lack of culture of the > newcomers. Or it demonstrates the need to get things done. I can write a regex to do a transform on 1000 text files in a directory and do the operation before you have closed the last paren on your parser. But I do appreciate theoretical purity and those who have the expanses of free time in which to cultivate it. john withers