Extracting C only

For extracting C only I used pattern_2 to achieve the same result.
It may have some side affects , but after submitting the answer test case passed.
Just sharing this information for reference.

Advanced-regular-expressions counting-mentions-of-the-c-language

pattern = r"\b[Cc]\b[^.+]"
pattern_2 = r"\b[Cc][  ]"
2 Likes

Yes, both [^.+] and [ ] matches a single character in the list.