Why does the following regular expression not match this text?
Text: Der Prozess kann nicht auf die Datei "C:\TEMP\ExchToPlanSyncAppointments.log" zugreifen, da sie von einem anderen Prozess verwendet wird.
regex: Der Prozess kann nicht auf die Datei "([\w\s[:punct:]]+)" zugreifen, da sie von einem anderen Prozess verwendet wird.
In C# regexes,
[:punct:]is not interpreted as something special, so you are defining a character range that includes ‘:’ and the letters in “punct”.Try
([\w\s:\.\\]+)instead.