null check on reg ex match added