Doing regex compile in adapter