refactor Lexicon to reduce the redundant regular expression definition

Also add tight constraint for user data