Refactor regex code

Add registration record support for field validation