diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php
index 674f4d7f1f6..4683b879a58 100644
--- a/htdocs/societe/ajaxcompanies.php
+++ b/htdocs/societe/ajaxcompanies.php
@@ -93,7 +93,7 @@ if (GETPOST('newcompany') || GETPOST('socid') || GETPOST('id_fourn'))
while ($row = $db->fetch_array($resql))
{
$label=$row['nom'];
- if ($socid) $label=preg_replace('/('.preg_quote($socid).')/i','$1',$label,1);
+ if ($socid) $label=preg_replace('/('.preg_quote($socid,'/').')/i','$1',$label,1);
$row_array['label'] = $label;
$row_array['value'] = $row['nom'];
$row_array['key'] = $row['rowid'];