Closed Thread
Results 1 to 3 of 3

Thread: html tags replace

  1. #1
    Join Date
    Jun 2008
    Posts
    6
    Rep Power
    0

    Wink html tags replace

    Hi,
    I am writing a program in perl which opens and reads a html file and removes unnecessary tags.
    For example if an html file has...
    <html>
    <title>this is the title</title>
    <body>
    <b>this is a bold text.</b><b>this is also a
    bold text</b>
    </body>
    </html>

    Since there are unnecessary bold tags..I mean it can also be written as <b>this is a bold text.this is also a bold text</b>

    Please tell me if I am on the right track...

    I read the html file line by line.
    On each line when I encounter <b> tag I take the line into a temp string until I approach </b> tag...and I keep searching for any other string after that which uses the <b>immediately after this. I can make separate subroutine to remove the unnecessary <b> tags.

    Or should I read file by per charcter encounter. I am fairly new to perl. Please advise me.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jun 2008
    Posts
    6
    Rep Power
    0

    Re: html tags replace

    i got it working.
    this thread can be closed now.

    i will try to post the part of t his code sometime for some else's use

  4. #3
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: html tags replace

    Since you managed to fix it, could I ask - what's with the username?

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems while tying to add <option> tags to html in IE8
    By thatsme in forum JavaScript and CSS
    Replies: 2
    Last Post: 09-06-2011, 11:59 PM
  2. clear html tags and after the tags
    By lol33d in forum PHP Development
    Replies: 1
    Last Post: 08-29-2011, 11:58 PM
  3. Optional Closing Tags in HTML
    By Big Mountain in forum HTML Programming
    Replies: 18
    Last Post: 05-18-2008, 07:34 AM
  4. HTML Replace code help!
    By alaminziz in forum HTML Programming
    Replies: 1
    Last Post: 07-06-2007, 04:22 PM
  5. Optional Closing Tags in HTML
    By Bodyag in forum HTML Programming
    Replies: 2
    Last Post: 03-11-2007, 11:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts