more concise regex generator