3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $rex = "/^(NR\:(?P<A02PNR>.{33}))?(TL\:(?P<A02TLD>.{7}))?(C35\:(?P<A02I35>.{1}))?$/"; $s = "TL:10SEP14C35:N"; preg_match($rex, $s, $m); var_dump($m);
Output for 4.3.3 - 7.1.0
array(10) { [0]=> string(15) "TL:10SEP14C35:N" [1]=> string(0) "" ["A02PNR"]=> string(0) "" [2]=> string(0) "" [3]=> string(10) "TL:10SEP14" ["A02TLD"]=> string(7) "10SEP14" [4]=> string(7) "10SEP14" [5]=> string(5) "C35:N" ["A02I35"]=> string(1) "N" [6]=> string(1) "N" }
Output for 4.3.0 - 4.3.2
array(7) { [0]=> string(15) "TL:10SEP14C35:N" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(10) "TL:10SEP14" [4]=> string(7) "10SEP14" [5]=> string(5) "C35:N" [6]=> string(1) "N" }