I may have found a bug in ~(X). AFAIK the first index (.sh.match[0])
in .sh.match always lists all patterns for which matches have been
found, and all following indexes (.sh.match[0..inf]) store the
captured matches for a specific bracket pair, right?

If that's correct, why does '15' appear in .sh.match[0][0] but no
other match has '15' later?

ksh -c 'x="a15 b2 c3" ; d="${x//~(X)(([[:alnum:]])&([[:digit:]]))+/}"
; print -v .sh.match'
(
        (
                15
                2
                3
        )
        (
                5
                2
                3
        )
        (
                5
                2
                3
        )
        (
                5
                2
                3
        )
)

Dan
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to