modify reg expression scope to remove too long variant for rdbms