We can use -w option to match the words when searching with grep. Example in CentOS:
grep -wi 'red' /etc/os-release