g10: Fix regexp sanitization.