in reply to Re^2: One true regexp for untainting windows filenames?
in thread One true regexp for untainting windows filenames?

There is no a string that

qr{(\A (?: .* / (?: \.\.?\z )? )? [^/]* )}msx

won't match.

It's wrong for two reasons.

Valid unix paths and only valid unix paths match

qr{^([\0]+)\z}

(Although that doesn't mean there can ever be a file referenced by that path.)