<a> instead of [link]

Jan 2, 2009 at 6:07 PM
Any regex gurus out there know what pattern to use to extract regular <a> tags instead of the default [link]?

Current pattern is:
"\\[link=\"(?<link>(.|\n)*?)\"\\s*(target=\"(?<target>(.|\n)*?)\")?](?<text>(.|\n)*?)\\[\\/link\\]"

May 6, 2011 at 2:02 PM

Does this regex work?

this seems to match basic <a tags with href and target

\<[aA]\s*(href)?\=\"(?<link>(.|\n)*?)\"\s*(target=\"(?<target>(.|\n)*?)\")?\>(?<text>(.|\n)*?)\<\/[aA]\>

Do Ping me, if this doesnot seem to work

Thanks,

Sudheer