Defer creating regex object until defined doc root value is known.