Hallo Bevan,
ich habe herausgefunden, wie das Ergebnis zustandekommt - allerdings habe ich nicht gleich einen Lösungsansatz für dein Problem. Hier trotzdem das Zusandekommen des Resultats:
$binstring = preg_replace ("/^0*(.*)0*$/", "$1", $binstring);
Der Reguläre Ausdruck wird von links nach rechts interpretiert. Demnach gehören die letzten Nullen immer noch zu (.*). Logisch, nicht? ;-)
Jetzt fehlt nur noch einer der Profis in regulären Ausdrücken, um dir die Lösung mitzuteilen.
Bis dann!
Marc Reichelt || http://www.marcreichelt.de/
--
Linux is like a wigwam - no windows, no gates and an Apache inside!
Selfcode: ie:{ fl:| br:> va:} ls:< fo:} rl:( n4:( ss:) de:> js:| ch:? sh:| mo:) zu:)
http://emmanuel.dammerer.at/selfcode.html
Linux is like a wigwam - no windows, no gates and an Apache inside!
Selfcode: ie:{ fl:| br:> va:} ls:< fo:} rl:( n4:( ss:) de:> js:| ch:? sh:| mo:) zu:)
http://emmanuel.dammerer.at/selfcode.html