changing link's target to blank page

Discussion in 'ASP .Net' started by Cesar Garcia H, Apr 15, 2005.

  1. Hi everybody...

    I'm making an application that receives HTML and before showing it has
    to format it in some way that all links that are inside that HTML must
    have target attribute with "_blank" value... so, to do this I need a
    regular expression that matches this :

    <a href="http://www.abc.com/"> OR
    <a href="http://www.abc.com/" target="somevalue">

    but, doesnt match this

    <a href="http://www.abc.com/" target="_blank">

    Been more specific, I need a regular expression that matches a link
    without target attribute, or with a target value different of "_blank"

    Some ideas??

    I tried googling... but... I didnt found anything.

    Thanks in advance

    Cesar Garcia H.
    http://www.zapcome.com/zapblog/cesargarcia
    Cesar Garcia H, Apr 15, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer
    Replies:
    1
    Views:
    1,756
    Brock Allen
    Aug 7, 2005
  2. TS
    Replies:
    5
    Views:
    4,813
  3. Voihad

    target blank

    Voihad, Jun 27, 2003, in forum: HTML
    Replies:
    0
    Views:
    1,297
    Voihad
    Jun 27, 2003
  4. bPstyles

    Target = Blank vs Top

    bPstyles, Oct 24, 2004, in forum: HTML
    Replies:
    26
    Views:
    15,288
    Matt Clara
    Oct 25, 2004
  5. mohit
    Replies:
    0
    Views:
    530
    mohit
    Jan 23, 2008
Loading...

Share This Page