Doesn't `$` already match `\r` on Windows? Unfortunately I don't have a Windows installation available, so I can't check this.