From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4354 invoked by alias); 29 Oct 2015 22:51:50 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37019 Received: (qmail 7666 invoked from network); 29 Oct 2015 22:51:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=L1mPCLpxWZP/ZlNS7QAhP4HiQ8g9FN5wIV1HwAxwu7g=; b=zNC1vFYEoC323vJWPYMyx+k5f5e8JrqqaLukWf+LKUYXhGfDlONmuoTMWFC10zxdUU qHSvtM1fZZFp/U6mkwL43vdbCrRUplyVHTkRVeLYxpHKtPWRcsvu3Kkv/WqVb18rky4P HgQnzdxW7y85WAhI3JJ1wtieB5l3/e56r6YPFsn5/NTPs9HX/Q6cMDhMZ7BSBUbkfENN YnTyldUi13xgWwzL5dV3JKOWj8RGuY63IAXlTNTNhWqhZqt06iFfGPtJW0855cLjynhk Z6euWWlTptuIsKqJQCkJ1d3SFbtbOUC+EwGREPP9k1V1BdLGqCHiCnBvBScz7jtTG444 22yw== X-Received: by 10.28.94.129 with SMTP id s123mr5836563wmb.78.1446145689134; Thu, 29 Oct 2015 12:08:09 -0700 (PDT) Date: Thu, 29 Oct 2015 19:08:07 +0000 From: Stephane Chazelas To: Zsh hackers list Subject: regexp-replace and ^ Message-ID: <20151029190807.GA18037@chaz.gmail.com> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) The way regexp-replace works ^ is going to match in several places: $ a=aaa zsh -c 'autoload regexp-replace; regexp-replace a "^a" b; echo $a' bbb That should probably be documented. (would also affect the \<, \>, \b, and various look-ahead operators in PCRE). Or maybe have a (E) for ERE and (P) for PCRE parameter expansion flags for the ${var//pattern/replacement}. -- Stephane