Is there a way to easily strip out HTML code?

4 replies
Hi Warriors - sometimes I need to grab a bunch of text from one of my web pages, but when I cut and paste anywhere (word, textpad, etc.) along comes all the HTML code.

Do you know an easy way or a free tool to easily strip out the code so I can have just the text?

Thanks!

David
#code #easily #html #strip
  • Profile picture of the author Andy Fletcher
    Copy and paste it into notepad. It's not smart enough to understand the HTML or anything so you just get the text.
    {{ DiscussionBoard.errors[655831].message }}
  • Profile picture of the author Lloyd Buchinski
    That problem used to bug me with xp and I had a light program I downloaded that would do it with a click. Can't remember anything about it though, like a name or anything that would help find it.

    In Word 07 after you paste text there is a small "paste options" icon at the right of the bottom line of the paste that only stays there until you do something else. If you click it one of the options you can select is "text only." Works beautifully.
    Signature

    Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

    The KimW WSO

    {{ DiscussionBoard.errors[656178].message }}
    • Profile picture of the author Martin Avis
      Create a text file with the folowing line:

      <?php echo strip_tags(file_get_contents('http://www.example.com/')); ?>

      Then save the file to a domain, changing the example.com to whatever web page you want to look at.

      Run the script and the contents of the page will be output to the screen with all the html removed.

      You may need to get a bit cleverer with your php if the page has javascript on it.

      Martin
      Signature
      Martin Avis publishes Kickstart Newsletter - Subscribe free at http://kickstartnewsletter.com
      {{ DiscussionBoard.errors[656201].message }}
  • Profile picture of the author steve m
    copy then paste it into note pad. notepad takes out all formatting. Then just recopy from the notepad and then paste it to where you originally wanted to paste it. I had a problem with when I was buying articles and pasting them directly into wordpress the text was very small. Thats when I was told to paste it in notepad first to remove all formatting first.

    Steve
    Signature
    {{ DiscussionBoard.errors[656184].message }}

Trending Topics