I am trying to match the letters 'C' or 'c' as they appear in a file.
They must be stand alone and NOT followed by a '+' or '.'.
The following two patterns give me the same result using Regex101, but I get a different result in the Dataquest IDE and my home PC.
The two patterns are:
pattern = r'\b[Cc]\b(?!\+|\.)'
pattern = r"\b[Cc]\b[^.+]"
The problem line in question is: (Line 223 from the hacker_news.csv file)
MemSQL (YC W11) Raises $36M Series C
On my home PC and Dataquests IDE: The regex using the negative lookahead matches that line. The other regex does not.
On Regex101 they both match that line.
I am NOT supposed to match it.
I wrote the lookahead regex, which fails in Dataquests IDE. The non-lookahead version is their answer, which passes.
I think they should both yield the same result, but they do not.
I am running Python 3.7.6
What am I missing?