I need to write a line of code in PHP to remove image tags from a string.
I am trying the following...
echo eregi_replace("<img .*?>", "", "some string <img src=> with images <img src= >");
...but keep getting the "Warning: eregi_replace(): REG_BADRPT in .../test.php on line ..." errormessage.
If I remove "?" from the regex it doesn't throw an error, but doesn't work as needed either doing a greedy match.