79637516

Date: 2025-05-25 09:08:20
Score: 2.5
Natty:
Report link

could be that the EOF is appended from a filestream with std::getline, so that a file with a single char (f.e 'a') content is calling fstream.getline() returns a string with length() == 2 and it is {'a',EOF}.

You need to pop_back() that EOF before regex matches in full line range with "^\d$"

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Oli