in reply to Unterminated \g... pattern in regex behaving badly on Windows

Most likely, you want to just use quotemeta, because your path separators in the form of backslashes are somewhere interpolated into a regular expression.

I don't see the code where you interpolate stuff into a regex, but if you look at where you do that, you should find the cause.

  • Comment on Re: Unterminated \g... pattern in regex behaving badly on Windows