- preg_match: documentation ( source)
<?php
//preg_match( "/^ndg\_keywords\.partial\([a-zA-Z\_\ ]+\)/", "ndg_keywords.partial('a_Imelda Staunton ')", $matches);
preg_match("/^ndg/", "ndg_keywords.partial('a_Imelda Staunton ')", $matches);
echo $matches[1]; // 1234
?>