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
Post a Comment