I have a string that I want to split like this:
Sinn.und.Sinnlichkeit.1995.German.DL.1080p.BluRay.x264-RSG <--- Original string
Sinn.und.Sinnlichkeit.1995.German.DL.1080p.BluRay.x264 <--- no match
Sinn.und.Sinnlichkeit.1995.German.DL.1080p.BluRay <--- no match
Sinn.und.Sinnlichkeit.1995.German.DL.1080p <--- no match
Sinn.und.Sinnlichkeit.1995.German.DL <--- no match
Sinn.und.Sinnlichkeit.1995.German <--- no match
Sinn.und.Sinnlichkeit.1995 <--- no match
Sinn.und.Sinnlichkeit <--- match
Sinn.und <--- no match
Sinn <--- no match
Until it has a API match.
Can you help me with that? I tried with preg_split, but it's not really working...
$string = 'Sinn.und.Sinnlichkeit.1995.German.DL.1080p.BluRay.x264-RSG';
$split = preg_split('/[.-]/', $string);
foreach( $split AS $explode )
{
echo $explode;
}