Help me with pregmatch please

Discussion in 'PHP' started by dshah, Jan 17, 2007.

  1. #1
    I want to extract-remove certain portion of content.

    Input

    Something...<center><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/abc"></param><embed src="http://www.youtube.com/v/abc" type="application/x-shockwave-flash" width="425" height="350"></embed></object></center>...something more
    Code (markup):
    Output

    Something......something more
    Code (markup):
    So basically I want to remove everything between (and including) <center> </center> tags


    Thanks in advance
     
    dshah, Jan 17, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    nico_swd, Jan 17, 2007 IP
  3. dshah

    dshah Well-Known Member

    Messages:
    1,840
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    115
    #3
    that would require me to go over all the tags needs to be removed (center, object etc etc)

    Anyone?
     
    dshah, Jan 17, 2007 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    No, you have to add the tags you want to allow as argument. If you leave it in blank it will automatically remove all tags.
     
    nico_swd, Jan 17, 2007 IP
  5. dshah

    dshah Well-Known Member

    Messages:
    1,840
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    115
    #5
    okay I will give it a try. Thanks
     
    dshah, Jan 17, 2007 IP