What will be the regex to replace/remove specific HTML pattern/string from a source string?

 

String patter:
abcdefghijk<span class='abc'>dfgghrf<div class='abc'>ewfwegwegewg

Need to remove everything in between<>


Below regex pattern can be used to get the required output:

return Regex.Replace(givenstring, $"<(.|\n|{Environment.NewLine})*?>", String.Empty);

 


Related #tags:     #html     #regex    

Related questions




Looking for change? Click below to prepare for technical interview.


Technical Interview Questions