want to convert a tag add target = "_blank"

Hello

My English ability is very poor sorry

I want to

<a href ="www.yahoo.co.kr"> => <a href ="www.yahoo.co.kr" target="_blank">

<a href ="www.yahoo.co.kr" target="_blank"> => <a href ="www.yahoo.co.kr" target="_blank"> (same)

<a href ="www.yahoo.co.kr" target="_top"> => <a href ="www.yahoo.co.kr" target="_blank"> (top => blank)

plz help me

[434 byte] By [homekeepera] at [2007-11-26 18:07:03]
# 1
your problem is not clear.. can you elaborate your question
jgalacambraa at 2007-7-9 5:38:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

It looks like a smart search/replace job is required on a bunch of html files.

Anywhere an anchor/link doesn't have a target, add one.

Anywhere it has target="_blank", retain it

Anywhere it has a target other than _blank, make that target _blank.

Theres probably a find/replace tool out there that will do this. sed/awk on unix would both be candidates.

I would probably do it with the java.util.regex package, write a pattern to find links like this, and do replace the text in them.

evnafetsa at 2007-7-9 5:38:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
that would be an awesome idea evnafets.. but the OP didn't tell it will be done in run time or during coding
jgalacambraa at 2007-7-9 5:38:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

thank you 2 man

I use web editor

user copy contents and then past my web editor

but image, font, size, link everything is ok

but I want to add link target

because link target self is very inconfortable

I want to add or change link target

I think use regular expression or htmlparser library.

but I can't..

homekeepera at 2007-7-9 5:38:16 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...