substr($regex, $i, $m) = '.' x $m;