in reply to Do not understand code

I don't see it mentioned, so thought I'd point out that /.BGV/ might be buggy for two reasons:
  1. Since . matches any character, /.BGV/ would match for example "foo-BGV".
  2. There's no anchor at the end, so it would match anywhere in the filename, for example "foo-BGV.txt".
It's possible that that's what was intended, but it likely should be /\.BGV\z/ if it's meant to be a file suffix, and maybe even /\.bgv\z/i if it isn't case-sensitive.

Replies are listed 'Best First'.
Re^2: Do not understand code
by LanX (Saint) on Sep 29, 2017 at 15:20 UTC