views:

133

answers:

2

i am trying to remove href attr from all the anchor tags using Reg Ex,for print page. Although i need the text value in anchors.

+3  A: 

Couldn't you just style your links using CSS? You could create two separate styles: one for "normal" web visits, and one for print. In the print-style, you don't visually enhance the links.

Bart Kiers
A: 

Never parse markup with regular expressions. BAD!

http://htmlparsing.icenine.ca

genio