regular expression help needed

Discussion in 'PHP' started by zurc, Feb 19, 2007.

  1. #1
    $str = 'I just finished work yey! <img src="style_emoticons/%3C#EMO_DIR#%3E/smile.gif" style="vertical-align: middle;" emoid=":)" alt="smile.gif" border="0">....';

    how do I remove the whole img tag there using regular expression thanks
     
    zurc, Feb 19, 2007 IP
  2. picouli

    picouli Peon

    Messages:
    760
    Likes Received:
    89
    Best Answers:
    0
    Trophy Points:
    0
    #2
    picouli, Feb 19, 2007 IP
  3. tnd

    tnd Well-Known Member

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #3
    If you just want to remove html tag only then use strip_tags is good for you but if there have other tag that strip_tags is not work then regex may help
     
    tnd, Feb 19, 2007 IP
  4. zurc

    zurc Banned

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I want to remove that from the string so that when I output the string it the image will not appear...
     
    zurc, Feb 19, 2007 IP