Trying to understand grouping in extended regular expressions. What is the difference between following two extended regular expressions.
$ echo "the CPU is" | grep -E '[Tt]he CPU|computer is'
the CPU is
$ echo "the CPU is" | grep -E '[Tt]he (CPU|computer) is'
the CPU is
On my Ubuntu bash shell the grep program in the former pattern highlights the CPU in red color. In the latter pattern grep highlights the CPU is. How is grouping change the pattern matching in the two cases above.