On CentOS 8, this grep
expresssion does not return matched strings:
% dmidecode -t memory | grep -E '^[ \t]+Size: [0-9]+'
However this one does return matched lines correctly (on the same distro):
% dmidecode -t memory | grep -E '^[[:space:]]+Size: [0-9]+'
What is the reason of such behaviour? As you can see both times grep
is invoked in extended regexp mode.