support regular expressions in opts.extensions