On 8/29/20 10:22 AM, Bruce Lilly wrote: > Bash Version: 5.0 > Patch Level: 17 > Release Status: release > > Description: > Bash parameter expansion (remove largest trailing match, remove > largest leading match, pattern replacement) does not work > Tested on OpenSUSE Leap 15.2, bash version 4.4.2.3(1)-release > (x86_64-suse-linux-gnu) > OpenBSD 6.7 bash version 5.0.17(1)-release (x86_64-unknown-openbsd6.7) > NetBSD 9.0 bash version 5.0.17(1)-release (x86_64--netbsd) > FreeBSD 12.1-STABLE bash version 5.0.18(2)-release (amd64-portbld-freebsd12.1) > > Same results in all cases; this report posted from NetBSD 9.0.
There are a number of things wrong with this report; I think later messages in the thread cover them. In short, 1. BRE bracket expression matching doesn't perform backslash-interpretation of anything, except to quote the next character, much less octal constant expansion; 2. You need `shopt -s extglob' to enable the pattern matching you want to use. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/