Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

regexp-replace and ^



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