c# - Remove duplicates with conditions using ASP.NET Regex -


i searching remove duplicates in document using regex or similar; remove following:

first line

<important text /><important text />other random words

i need remove duplicates of <some text/> , keep else remain is. text may or may not on multiple lines.

it need work off of several different words use < > tags.

edit:

i not know words be. nested inside < > tags , not be. need remove duplicates repeat 1 after each other like:

<text/><text/><words/><words/><words/> 

and output should be:

<text/><words/> 

this regex search duplicate tags, (<.+?\/>)(?=\1), , here regex 101 prove it.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -