<?php $string = "address='St Marks Church',notes='The North East\'s premier...'"; preg_match_all( "/(address|notes)='\K(?:\\\'|[^'])*/", $string, $out ); var_export(array_combine($out[1], $out[0])); echo "\n---\n"; preg_match_all( "/(address|notes)='((?:\\\'|[^'])*)/", $string, $out, PREG_SET_ORDER ); var_export(array_column($out, 2, 1));
You have javascript disabled. You will not be able to edit any code.