I want to get html tag from the string.
I have tried this regex:
"<[\r\n ]*/?[\r\n ]*(.*?)[\r\n ]*/?[\r\n ]*>"
But it is also giving me:
< / table />
I don't want such wrong tags.
Try </?[^>/]*>|<[^>/]*/> or </?[^>/]+>|<[^>/]+/>. Google is your friend as well.
< / table /> I don't want such wrong tags.<html><body><img src='#' /></body></html>
Regexcarefully and limitedly in just some certainHTMLpatterns would be OK.