3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sourcestring=' part "R102" { type : "1AB000150018", } part "R103" { type : "1AB000150018", } part "R106" { type : "1AB000150018", } part "R107" { type : "1AB000150018", } part "R111" { type : "1AB000150018", } part "R112" { type : "1AB000150018", } part "C1" { type : "1AB008141056", } part "C105" { type : "1AB010050101", } part "C108" { type : "1AB010050101", } part "C111" { type : "1AB010050101", } part "C112" { type : "1AB010050101", } part "C116" { type : "1AB010050101", } part "C119" { type : "1AB010050101", } part "CR101" { type : "1AB013040001", } part "R108" { type : "1AB134110002", } part "R109" { type : "1AB134110002", } part "C101" { type : "1AB169790006", } part "C102" { type : "1AB169790006", } part "C103" { type : "1AB169790006", } part "C104" { type : "1AB169790006", } part "C120" { type : "1AB169790006", } part "PW1" { type : "3EM13494AA", } part "HY102" { type : "NOT-INST-PRT", } part "Q101" { type : "NOT-INST-PRT", } part "Q102" { type : "NOT-INST-PRT", } part "Q103" { type : "NOT-INST-PRT", } part "AT1" { type : "1AB103050002", }'; preg_match_all('/^\s*part\s"([^"]*)"[^{]*{[^}]*\stype\s*:\s+"(?![NOT_||BA])([^"]*)"/ism',$sourcestring,$matches); echo "<pre>".print_r($matches,true); ?>

preferences:
45.74 ms | 402 KiB | 5 Q