.net - Regex to return the description in hyperlink -


hi i'm using code:

dim expr string = "\<(.|\n)+?\>" 

and trying remove hyperlink below:

<a href="https://support.sample.com/applications/managemyengagements/documents/solutioncontingency.html" target="_blank">demo </a> 

my target return hyperlink description "demo" when trying replace matched items empty string being replaced.

desired result:

demo 

please help

thanks!

your string has 3 parts:
a: <a ...>
b: demo
c: </a>

to match thous 3 parts use: /<a [^>]+>(.*?)<\/a>/

<a [^>]+> match a, string starting ""
(.*?) match b, data not greedy
<\/a> match c, string ""


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -