Regular expression- add target="blank" to all <a> tag links in my content

Posted by dotnetrocks on Stack Overflow See other posts from Stack Overflow or by dotnetrocks
Published on 2010-05-10T23:28:16Z Indexed on 2010/05/10 23:34 UTC
Read the original article Hit count: 278

Filed under:

Can some one help me create a regular expression in C#.net to add target="_blank" to all tag links in my content? If the link already has a target set then replace it with "_blank". The purpose is to open all links in my content in a new window.

Appreciate your help

-dotnet rocks

© Stack Overflow or respective owner

Related posts about regex