How to extract particular string from given URL in SQLITE DB

Posted by Vishalneeraj-24503 under Node.js on 12/18/2017 | Points: 10 | Views : 2294 | Status : [Member] [MVP] | Replies : 1
Hello Guys,

I came around a situation where i have to extract a particular string on a given URLs/Sites in SQLite DB :-

suppose URL is :-
www.yahoo.com/sites/spec/aaa/aaa.aspx
https://facebook.com/sites/test/bbb/test.aspx
uat-abc-link/project/sites/fastplay/kwott/site-page/dbs.html
https://amst-tpage/speg/minaral-water/pages/mpower.aspx
www.marklet/mplay/extra.fff/chart.aspx


Now my concern is - I want to get URL till spec/test/speg/fastplay/mplay and remove everything after that words.
So my output would be :-
www.yahoo.com/sites/spec
https://facebook.com/sites/test
uat-abc-link/project/sites/fastplay
https://amst-tpage/speg
www.marklet/mplay.


Please note that - Not every URLs/ Sites have .com domain.

Thanks in advance....




Responses

Posted by: Sheonarayan on: 12/23/2017 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Doing this in SqlLite database may be difficult. You can try to get data in the application and use C# string functions like .SubString, Replace etc. to extract the data you want.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Vishalneeraj-24503, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response