I have a column that contains html details in it and within each column, the html contains different http links. I need to find out all the http links in each column.
e.g.: column 1 Row 1
html
...
a href = http://www.column1.com.......
img src=http://www.pic1.com/images/im.jpg...
...
/html
column 1 Row 2
html
...
a href = http://www.column2.com.......
img src="http://www.pic2.com/images/im.jpg"....
/html
in the result I need to get the following list :
- link1 in first column1 in href
domain in the first column img link - link2 in second column2 in href
domain in the second column img2 link
Could anyone help me to find this as i don’t have a clue at all what to do and I’m not good using sql.
well you can use
charindexto try and find index ofhttp://and then you need to find end of URL (it depends on you data, space or “).you can also write CLR scalar function, implementing regular expression find
Then you need to create assembly on your SQL Server from this class library
Then you can create function