Why is it that neither the original regex
static regex reg2("File: ([^ ]+).*");
nor my space-friendly version
static regex reg2("File: ([^\\.]+\\.+[^ ]+).*");
finds one of the following two lines:
File: 0_home_juergen_test_New_Folder_hsa_bh.jpg Graphic file (type jpg)
File: /home/juergen/test/New Folder/hsa bh.jpg Graphic file (type jpg)
Your second regex can be wrong since . is allowed in path, at least
under linux. I do not know why it can not parse your two examples
though. Your committed version seems to be fine but why is the + after
\\.? Are you allowing multiple .? I would do .+\\.\w+ (not tested).
Bo