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 q12EXIj5007233 for ; Thu, 2 Feb 2012 15:33:19 +0100 Received: (qmail 26442 invoked by alias); 2 Feb 2012 13:33:13 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 02 Feb 2012 13:31:33 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx053) with SMTP; 02 Feb 2012 14:31:33 +0100 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 q12CWX5L014691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Feb 2012 13:32:34 +0100 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 q12Bn5Xn006469; Thu, 2 Feb 2012 13:32:33 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 2024797 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 2 Feb 2012 13:32:32 +0100 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 q12CWWFs005568 for ; Thu, 2 Feb 2012 13:32:32 +0100 Received: from mail-lpp01m010-f49.google.com (mail-lpp01m010-f49.google.com [209.85.215.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q12CWRIn014626 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 2 Feb 2012 13:32:32 +0100 Received: by laam7 with SMTP id m7so1738911laa.22 for ; Thu, 02 Feb 2012 04:32:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.128.133 with SMTP id no5mr985937lab.31.1328185947649; Thu, 02 Feb 2012 04:32:27 -0800 (PST) Received: by 10.152.13.106 with HTTP; Thu, 2 Feb 2012 04:32:27 -0800 (PST) References: <20120202102957.GB14566@csmvddesktop> <4F2A68F9.1010508@morningstar2.co.uk> <20120202111808.GA15304@csmvddesktop> Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Thu, 2 Feb 2012 07:32:27 -0500 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Mapping Functions Versions for All and Some To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <20120202111808.GA15304@csmvddesktop> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (BackTrace mail analyze); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnGL2vqOgpaBYL16oitsMrgDt/NQNpSCZFFjDOy 97xb7Zpf+wZnd5ZXNcvLDXR3Wg3wRjdQbwEMh8=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: 7004 Hi Joseph, You got two things backwards: the order of the arguments (maybe that means it should be revised), and the order of the parameters of \c. > : Although it is not yet in l3kernel, I wonder if this is a job for the > : l3regex module that Bruno has written. Using a regex, it is possible to > : specify complex token list requirements without needing lots of > : dedicated functions (at the cost of performance). (The regex code is in > : l3experimental.) For example, The following shoul (I hope) match a token > : list made up entirely of letters with category code 'letter' > : > : \regex_match:nnTF { } { ^\c[a-zA-Z]L+$ } ... Should be \regex_match:nnTF { ^ \cL[a-zA-z]+ $ } { } ... instead (if that doesn't work, it's a bug and I'll investigate). > Thanks. For token lists, the regex module seems more appropriate than > my proposal. Also I have to admit that I hadn't looked at the regexp > module yet. It certainly lets me do what I need. However, I think the > functions I proposed are useful on their own. I've been wondering: should it be called "regex" or "regexp"? Like Joseph, I don't see how useful the functions you propose are. Do you have a precise use case? I think that what you propose can be done (in the non-expandable case) as (say for the "some" version): \bool_set_false:N \l_my_bool \tl_map_inline:Nn \l_my_tl { \my_conditional:nT {#1} { \bool_set_true:N \l_my_bool \prg_map_break: } } \bool_if:NTF \l_my_bool { } { } I hope this helps. Regards, Bruno