I need to get the text between html tags in SQL.
< em> " **Test,Extract Me** " < /em>
This is just a small part of html body where the unique identifier is < em>"
Please help
I need to get the text between html tags in SQL.
< em> " **Test,Extract Me** " < /em>
This is just a small part of html body where the unique identifier is < em>"
Please help
SELECT SUBSTRING(ColumnName,CHARINDEX('html_tag',ColumnName)+LEN('html_tag'),CHARINDEX('html_close_tag',ColumnName)-LEN('html_close_tag')) FROM TableName
please replace html_tag,html_close_tag with your tags.
With using JQUERY you can find easily with simple one line of code :
$('em').text();
You can do the same with simple JS as well
document.getElementsByTagName('em')[0].innerText