79773686

Date: 2025-09-24 12:04:58
Score: 1.5
Natty:
Report link

Escaping '.' solved the problem

<?php
    $text1 = "eggs";
    $l = 'e.g.';
    $ll = str_replace(".", "\.", $l);
    $text2 = preg_replace(["/\b{$ll}\b/", ], ["<b>{$ll}</b>", ], $text1);
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Виктор Виктор