$re = '/<Field name=\"Activity ID\">((.|\n)*?)</Field>/i';
$str = '<?xml version="1.0" encoding="UTF-8"?>
<appointments>
<appointment>
<Field name="Activity Date">2013-11-08</Field>
<Field name="Activity Queue">546278</Field>
<Field name="Activity Status">cancelled</Field>
<Field name="Customer Name">John Smith</Field>
<Field name="Activity ID"> 1-John Smith (menor)
1-John Smith (menor)
1-John Smith (menor)
1-John Smith (menor)
1-John Smith (menor)
1-John Smith (menor)
1-John Smith (menor)
1-John Smith (menor)
5 (menor) 411 8
</Field> <Field name="Is a VIP">1</Field>
</appointment>
<appointment>
<Field name="Activity Date">2-013-11-08</Field>
<Field name="Activity Queue">2-546278</Field>
<Field name="Activity Status">2-cancelled</Field>
<Field name="Customer Name">2-John Smith</Field>
<Field name="Activity ID">(menor) 2- 411 8(menor)
</Field> <Field name="Is a VIP">2-</Field>
</appointment>
</appointments>
';
$subst = "a";
$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