I was wondering if you could help.
I have the line:
$desc = preg_replace("/#\d{1,3}%/", "<b>$0</b>", $desc);
Where $desc is a tweet. Im hoping to recognise hash tags with a percentage. Such as:
#100% or #25% or #1%
However the string is not getting either matched or replaced. If you could help it would be greatly appreciated.
Example:
$desc = "testing #ugp 123 fb #75% #1% #100%. (Twitter@Feb 23, 2011 6:06 PM)";
$desc = preg_replace("/#\d{1,3}%/", "<b>$0</b>", $desc);
echo $desc;
Expected output would have the 3 matching tags to be wrapped in tags, However output does not change from the original
Cheers