Updated: add pk_regex generation.