Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s7D9jpC7029452 for ; Wed, 13 Aug 2014 11:45:52 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx004) with ESMTPS (Nemesis) id 0M83bl-1WV14q1kjx-00vgqo for ; Wed, 13 Aug 2014 11:45:46 +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 s7D9h0eS029453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Aug 2014 11:43:00 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s7D92T6g016363; Wed, 13 Aug 2014 11:42:59 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11266017 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 13 Aug 2014 11:42:56 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s7D9gtBd002295 for ; Wed, 13 Aug 2014 11:42:55 +0200 Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s7D9gePn013163 for ; Wed, 13 Aug 2014 11:42:44 +0200 Received: from mxin1-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp4.clear.net.nz (CLEAR Net Mail) with ESMTP id <0NA800HJUOB1BL10@smtp4.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Wed, 13 Aug 2014 21:42:38 +1200 (NZST) Received: from 121-74-33-92.telstraclear.net (HELO [127.0.0.1]) ([121.74.33.92]) by smtpin1.clear.net.nz with ESMTP; Wed, 13 Aug 2014 21:42:38 +1200 MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Antivirus: avast! (VPS 140812-3, 13/08/2014), Outbound message X-Antivirus-Status: Clean User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 Message-ID: <53EB330F.8050302@clear.net.nz> Date: Wed, 13 Aug 2014 21:42:39 +1200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: l3regex suggestion To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:2XOT1Za5heY=:rf31XYZwrjSrK1BgnO0iuiJZ3C gp84RPknSs3HDRceng12KrP2oamXvQjUV5oNs5/ZCZEv9SMjvUxJTtNvcbt5BBsAfHse1fUW+ q+t4dWStZR09LRDJwRFXtkpf/CA/F797hfQMFQZYUoCICmoXfTbarv4aHRrCVMyMVhviYvGuB QoaLq4r+cZwV2k1u8+HqSBZTha2eQfo7De0Hs16FBfypLDbYehpaTptMOukbrlXZciPrF9Wgw SDtE5xrg0Bt4+9WSwu8HYOKnnrzrf80zqzA3AHnysq7MdsPNllbZXJbTwgcV2E/BwYeXRcXEi pB0vqBRMBJ5/gSo/tdiGxFJ74D9aOu4TTrmrYS8mK053Nw8CYx8HIW8FtznxBAG3s7GFgfYQ3 9hHIz1TxjguCv/qzb6S3qHRpu45cVoPgWrpnbodBxXj50wut7k7AygFB9i4nEFiTQJwtygkwp ZUE1U3mHGV0DfcESZ0EEHGS13I8YVgr0CU9jlgzPunzN9yRohdn4bat9bsWcNlDAXIZ6KWzQv NqdxxMZc3NDK9pZiFVyt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out-Filterresults: notjunk:1; Status: R X-Status: X-Keywords: X-UID: 7556 I have been using l3regex and tripped on the following circumstance. Suppose \tl_set:Nn \l_tmpa_tl { abcdef } Then \regex_replace_all:nnN { cd } { 12 } \l_tmpa_tl results in \l_tmpa_tl containing ab12ef, but there is no built-in function for the analogous match or extract function. This was disconcerting for a moment, to discover that I could replace text but couldn't match it. Of course I can, but it means resorting to \exp_args:Nno as in \exp_args:Nno \regex_match:nnTF { cd } \l_tmpa_tl { true } { false } It would be consistent with the presence of \regex_replace_all:nnN and \regex_replace_all:NnN if there were corresponding functions, \regex_match:nN and \regex_match:NN, and similarly for extract. In the context in which I was working, the token list variable (analogous to \l_tmpa_tl above) is set to a mathematical formula elsewhere in the code. The formula is most naturally handled in this way as a token list variable rather than as a token list. Andrew