Correction Détection SIREN

This commit is contained in:
Michael RICOIS 2010-05-27 09:41:20 +00:00
parent 058c0318c1
commit 83521a0426

View File

@ -1,7 +1,7 @@
<?php
function commentaires_siren($content){
$pattern = '/(.*?)<siren>([0-9]{3}) ([0-9]{3}) ([0-9]{3})<\/siren>(.*?)/i';
$pattern = '/(.*?)<siren>([0-9]{3})(?: )?([0-9]{3})(?: )?([0-9]{3})<\/siren>(.*?)/i';
$replace = '$1<a href=/?page=identite&siret=$2$3$4>$2 $3 $4</a>$5';
$output = preg_replace($pattern, $replace, $content);
return $output;