3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $re = "/^((?:\d{2}\.?){3}).*?(\w{2}\s\d{4}).*?(\d{2}:\d{2})(?:.*?(\b[a-z]+\b).*?(\b[a-z]+\b))?$/m"; $str = "A N K U N F T 11.08.15 *** NEUBUCHUNG *** 11.08.15 xxx xxx X3 2830 14:25 17:50 18.08.15 xxx xxx X3 2831 18:40 F882129 dsdsaidsaia F882129 xxxyxyagydaysd A N K U N F T 18.08.15 *** NEUBUCHUNG *** 11.08.15 xxx xxx X3 2830 14:25 17:50 18.08.15 xxx xxx X3 2831 18:40 F881554 ZXCXZCXCXZCCXZ F881554 xcvcxvcxvcvxc F881554 xvcxvcxcvxxvccvxxcv 11.08.15 xxx xxx X3 2830 14:25 17:50 18.08.15 xxx xxx X3 2831 18:40 F881605 xczxcdfsfdsdfs F881605 zxccxzxzdffdsfds "; $re = "/(?:\sF\d+.*?\n\n)(\n)/"; $subst = ">>CUT HERE>>"; $result = preg_split($re, $str, -1); echo $result; ?>
based on Ll40D
Output for 5.4.0 - 7.2.0
Notice: Array to string conversion in /in/E701K on line 31 Array
Output for 4.3.0 - 5.3.29
Array