Results 1 to 11 of 11

Thread: How to remove multiple hyperlinks from a html page?

  1. #1
    Registered
    Join Date
    Apr 2004
    Posts
    22

    How to remove multiple hyperlinks from a html page?

    Hi...does any one know to remove a plain html page full of links at one go?

    I'm trying to extract some data from a table but I don't want the hyper links, there are few hundred different links so I can't do a find and replace.

    Thanks in advance.

  2. #2
    Future AstonMartin driver r2d2's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,608
    You'll probably want to use a text editor that can use 'regular expressions'. That way you can just remove the '<a XXXXX>' and '</a>', so leaving the link text as normal text. I don't know of a free one for windows (there probably is one though).

  3. #3
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    edit plus supports regular expressions and has a 30 day free evaluation period. Its what I use.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  4. #4
    Registered Member moonshield's Avatar
    Join Date
    Aug 2004
    Location
    Charlotte
    Posts
    1,281
    ^ I second that. Edit Plus is an excellent piece of software.

  5. #5
    you could also write a little script to do it... shouldn't take more than 5 minutes if you know php

  6. #6
    Sean
    Join Date
    Nov 2005
    Posts
    139
    Chris and Moonshield: Thanks for mentioning editplus, I just downloaded it and it's great. I wish I had known about it before, I really could've used it. heh

  7. #7
    Registered
    Join Date
    Apr 2004
    Posts
    22
    Thank you so much everyone...But I dont really understand just yet...

    So for example I have many different links like :

    <a href="http://www.yahoo.com">Yahoo</a>

    <a href="http://www.google.com">Google</a>

    What do I key in the find and replace?
    Last edited by danielng; 11-22-2005 at 12:12 AM.

  8. #8
    Registered
    Join Date
    Apr 2004
    Posts
    22
    I have another question about CSS

    Is it possible to set a table with different background cell colours for alternate rows using CSS?

    This is the current stylesheet for my table.

    .stats {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 15px;
    color: #333333;
    background-color: ##F5F5F5;
    }

  9. #9
    Future AstonMartin driver r2d2's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,608
    Have a google for something like 'regular expressions removing hyperlinks' - it should reveal something. or search for 'regular expressions guide' to find how to make your own little reg. exp.

  10. #10
    Sean
    Join Date
    Nov 2005
    Posts
    139
    Quote Originally Posted by danielng
    I have another question about CSS

    Is it possible to set a table with different background cell colours for alternate rows using CSS?

    This is the current stylesheet for my table.
    http://www.w3.org/TR/css3-selectors/#structural-pseudos would be for that but you'd be much better off using php or javascript.

  11. #11
    Registered
    Join Date
    Apr 2004
    Posts
    22
    Quote Originally Posted by r2d2
    Have a google for something like 'regular expressions removing hyperlinks' - it should reveal something. or search for 'regular expressions guide' to find how to make your own little reg. exp.

    Got the regular expression thingy worked out.

    I did a find and replace for <a href="http://[^"]+"> and all the links were removed in an instant.

    Thanks...

Similar Threads

  1. Is any other method to get Website PR ?
    By number7 in forum Search Engine Optimization
    Replies: 10
    Last Post: 01-08-2019, 03:33 AM
  2. does the page type matter? (html, php, etc.)
    By RockNRollPig in forum Search Engine Optimization
    Replies: 1
    Last Post: 02-23-2004, 11:01 PM

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
  •