$re = '/((?:bs )?(?:en )?(?:np )?is[o0]\s+[-\d]+:)(.+:)?(\d{4}(?:\(e\))?)/im';
$str = 'ISO 11784:1996/Amd.2:2010(E)
ISO 11784:2010(E)
ISO 11784:2010
ISO 11784-2-3-4:1996/Amd.2:2010(E)
ISO 11784-2-8-7:2010(E)
ISO 11784-5-120-78949-56-789:2010
BS EN ISO 11784:1996/Amd.2:2010(E)
EN ISO 11784:2010(E)
IS0 11784:2010
EN NP IS0 11784-2-3-4:1996/Amd.2:2010(E)
BS IS0 11784-2-8-7:2010(E)
EN NP ISO 11784-5-120-78949-56-789:2010
';
$subst = "$1$3";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php