Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id p9D81PuX001809 for ; Thu, 13 Oct 2011 10:01:26 +0200 Received: (qmail 25485 invoked by alias); 13 Oct 2011 08:01:17 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 13 Oct 2011 08:01:16 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx090) with SMTP; 13 Oct 2011 10:01:16 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p9D7x2NR025041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Oct 2011 09:59:03 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p9D7FjPi001703; Thu, 13 Oct 2011 09:59:02 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1789527 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 13 Oct 2011 09:59:02 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p9D7x2DV019733 for ; Thu, 13 Oct 2011 09:59:02 +0200 Received: from mail-yw0-f49.google.com (mail-yw0-f49.google.com [209.85.213.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p9D7wuhY024985 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 13 Oct 2011 09:59:01 +0200 Received: by ywf9 with SMTP id 9so1205444ywf.22 for ; Thu, 13 Oct 2011 00:58:56 -0700 (PDT) Received: by 10.100.191.2 with SMTP id o2mr490643anf.24.1318492736347; Thu, 13 Oct 2011 00:58:56 -0700 (PDT) Received: from [10.0.1.3] (d175-39-2-178.sbr800.nsw.optusnet.com.au. [175.39.2.178]) by mx.google.com with ESMTPS id 16sm14095210ant.10.2011.10.13.00.58.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Oct 2011 00:58:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) References: <4E93664D.7090105@residenset.net> <7225.1318285652@cl.cam.ac.uk> <4E945FF9.1060803@residenset.net> X-Mailer: Apple Mail (2.1081) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id p9D7x2DV019734 Message-ID: Date: Thu, 13 Oct 2011 18:28:50 +1030 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: Strings, and regular expressions To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p7zYQev1Bv5lawyulDRL8cto/GpR7e17TUa5Ln/CekoOLrK4KkuGl2+A+bZY C+DBLtQQiSVoO0eSUbXXNQ9E+8uFidGKmTigp9kD2tGYKwDV4s7YPSqL7nOxwefscGLj+0vpiB0v ENY4vMNb8MXeZ3uGhjb/fJ+vIQtemp+hN5r3OkYy9wXfe8+cHYd0L28PCU=V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 6933 On 12/10/2011, at 1:29 PM, Bruno Le Floch wrote: > For short strings (e.g., matching \d\d\d\d-\d\d-\d\d on 2011-10-11), > one third of the time is spent on building the automaton from the > regular expression, and two thirds on running the automaton. I don't > know how important that is in practice. Two aspects: > > - providing it requires more code --- true > > - the N arguments may be confusing (e.g., some people may think that > it expects the regex as a string variable) --- not such a problem > because the variable is checked to indeed be a proper compiled regex. > > If the feeling is that it should go, then I'll remove that this weekend. I think it would be premature to remove it at this stage. In fact, if you were going to remove either of them, it'd make more sense to me to remove the slower inline versions. If you really thing the n/N distinction is confusing, what about a "currying" mechanism whereby regexes automatically create their prebuilt form and save it in an internal macro which is used for subsequent calls to the same regex? -- Will