|
Im feeling generous.
Here is your code, tested.
<?php
$g = "23,245,34\n35,23,12\n45,45,45";
$g = preg_replace("/\d*,\d*,45$/","",$g);
$g = "Joe,Jim,Rob\nJosh,Jon,Tom\n";
$g = preg_replace("/\w.*,\w.*,Rob/","",$g);
echo $g;
?>
The one caveat is it leaves blank lines where the old ones were, but that wont show up when you re-import to excel.
|