PHP/String/String Split
Версия от 10:37, 26 мая 2010; (обсуждение)
preg_split (/\+{1,}/)
<?php
$delimitedText = "+Java+++PHP+++++++++++ASP+++OH";
$fields = preg_split("/\+{1,}/", $delimitedText);
foreach($fields as $field) echo $field."<br />";
?>
Splitting a String Based on a Found String
<html>
<head>
<title>preg_split</title>
</head>
<body>
<?php
$date = "10/10.95";
/* Allowed date delimiters are . / - */
$date_array = preg_split("/[.\-\/]/", $date);
var_dump($date_array);
?>
</body>
</html>