3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // osekne retazec $auto = "Audi V8 [C]250000 Kč[/C]"; $regular = "~(.*)\[C\].*\[/C\](.*)~i"; $oseknuty = preg_replace($regular, "$1$2", $auto); // vypíše "Audi V8 " echo('"' . $oseknuty . '"');
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
"Audi V8 "