Improve repeated parameter regexp generation