How would I write the pattern for this preg_split()?
"/T.*O.*B/", seems to only return the first and last portion of the string
(1: Once upon a time, 2: going for a walk).
$string = "Once upon a time T:O.B there was a T.O,B duck who was T-O'B going
for a walk";
$array = preg_split('/T.*O.*B/', $string, -1, PREG_SPLIT_OFFSET_CAPTURE);
for ($i=0; $i<sizeof($array); $i++) {
echo $array[$i]."<br>";
}
Any thoughts?
// Tobias
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php