$re = '/(<p value="id">(?=1445).+\R.+<p value="IP">)(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(.+)/m';
$str = ' <list name="ItemList">
<item>
<p value="id">1445</p>
<p value="IP">10.25.30.19</p>
<p value="Prflen">26</p>
</item>
<list name="ItemList">
<item>
<p value="id">1499</p>
<p value="IP">10.40.50.53</p>
<p value="Prflen">26</p>
</item>
<list name="ItemList">
<item>
<p value="id">1445</p>
<p value="IP">10.45.70.19</p>
<p value="Prflen">26</p>
</item>
<list name="ItemList">
<item>
<p value="id">1446</p>
<p value="IP">10.77.90.55</p>
<p value="Prflen">26</p>
</item>';
$subst = "\110.25.30.19\3";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php