we want to check if following rpm's version are installed , so we did as:
rpm -qa | egrep -c 'python-argcomplete-0.3.7-1|postgresql-libs-9.2.13-1.el7_1.x86_64'
since higher version of postgresql-libs
can also installed as - postgresql-libs-9.2.19-1.el7_1.x86_64
then we try to capture both versions as following but without success
rpm -qa | egrep -c 'python-argcomplete-0.3.7-1|postgresql-libs-9.2.[^0-9]-1.el7_1.x86_64'
expected results should be 2 but we get 1