complier regex as pattern