Why does
$ echo `expr match abcdef 'abc'`
give number of characters matched, which is 3, but
$ echo `expr match abcdef '\(abc\)'`
gives the characters matched , which is abc ?
I understand regex matching is in play here, but cannot understand how having a parenthesized sub expression is making this difference here?
That has nothing to do with regular expressions. It is only a difference how the command “expr” works. The first one returns the length of the matching substring and the second one returns the matching substring itself.
There is a very good summary: TLDP refcard. You find a summary of combinations how expr can be used.