Reputation: 2723
I just discovered that the eregi
is deprecated, and that preg replace
works differently.
How would you translate this?
$text = eregi_replace("\\[img\\]([^\\[]*)\\[/img\\]", "", $text);
Upvotes: 0
Views: 43
Reputation: 2723
Apparently this works:
$text = preg_replace("#\[img\](.+?)\[/img\]#is", "", $text);
Upvotes: 0
Reputation: 9635
you can try this one
$text = preg_replace("/\\[img\\]([^\\[]*)\\[/img\\]/i", "", $text);
/
and /i
preg_replace
instead of eregi_replace
Upvotes: 0