[3.1] Remove unnecessary regex backslashes
Backport !951 (merged) to 3.1
Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057787
Actually the Debian bugreport is about the 3.0 branch - I'll submit a separate MR for 3.0 once this MR gets approved.