<?php $txt = 'dog.cat' . str_repeat('.dog.cat', 815); for ($i = 0; $i < 5; ++$i) { $txt .= '.dog.cat'; echo count(explode('.', $txt)) . "\n"; echo strlen($txt) . "\n"; if (preg_match("/[a-z]+(\.[a-z]+)*/i", $txt, $match)) { echo "A match was found." . strlen($match[0]); } else { echo preg_last_error(); } echo "\n---\n"; }
You have javascript disabled. You will not be able to edit any code.