Looking at your sample \S+?\.c should work.
\S+?\.c
\S checks for the 1st non whitespace character and matches
\S
+? quantifies this match for as few as possible characters
+?
\.c matches the dot and c
\.c