This is not sufficient. In the case of three backslashes, this will just consume the latter two. Use `^([^\\]|\\.)*` instead.