Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
regexp-replace and ^
- X-seq: zsh-workers 37019
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: regexp-replace and ^
- Date: Thu, 29 Oct 2015 19:08:07 +0000
- 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==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author