changing link's target to blank page

C

Cesar Garcia H

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top