I am using
find . -name '*.[cCHh][cC]' -exec grep -nHr "$1" {} ';'
find . -name '*.[cCHh]' -exec grep -nHr "$1" {} ';'
to search for a string in all files ending with .c, .C, .h, .H, .cc and .CC listed in all subdirectories. But since this includes two commands this feels inefficient.
How do I write a regex to include .c,.C,.h,.H,.cc and .CC files using one single regex?
EDIT: I am running this on bash on a Linux machine.