mongodb data extraction

31 views
Skip to first unread message

mohit samarth

unread,
Jun 28, 2016, 6:56:57 PM6/28/16
to mongodb-user

I need to display only a the domain and DNS server's name from a rawhtml files.

I tried the $regex:

db.builtwith1.find({"rawhtml":{"$regex":".*'content= "Web technologies'.*"},"rawhtml":{"$regex":".*'is using on their website'.*"}}})

but I am not getting the desired output.

EG rawhtml:

^!DOCTYPE html>^html>^head>^meta charset="utf-8" />^link rel="dns-prefetch" href="//trends.builtwith.com" />^link rel="dns-prefetch" href="//trendspro.builtwith.com" />^link rel="dns-prefetch" href="//api.builtwith.com" />^title>
JUSTPATERSON.CO.NZ Technology Profile^/title>^meta name="description" content="Web technologies JUSTPATERSON.CO.NZ is using on their website." />^meta name="viewport" ......

Of this text I need to just extract JUSTPATERSON.CO.NZ

Can anyone suggest a generalized result using mongo shell/ IntelliJ?


Can Anyone come up with a Query for getting the domain name ??

Reply all
Reply to author
Forward
0 new messages