I have a list which has a lot of URLs , thousands of urls. Here is the example

```
UrlList = ["www.test.com", "www.123.com", "www.youtube.com", "youtube.com", 123.com, test.com, c.microsoft.com, office.microsoft.com]

```

There are urls which doesn't have .com or www. or http:// or https:// and there are which does.

I'm trying to ignore all that and just searching for test or youtube or microsoft etc in the URL List, once it is found print the whole URL.

How can i do this?

Edit : Sorry i forgot to post the attempt   

**Attempt 1#:**
**Code for Attempt 1#:**

```
fileURLs = urlReader()
print("Here is the URLs in the File which needs to be search in the List.")
print(fileURLs)
for x in data:
    for y in x['urls']:
        url = str(y)
        if url in fileURLs:
            print(x['id'] , url)

```

Output for Attempt 1#: 

```
Here is the URLs in the File which needs to be search in the List
['youtube.com', 'test.com', '123.com']
(u'CUSTOM_03', 'test.com')
(u'CUSTOM_05', 'youtube.com')
(u'CUSTOM_07', 'test.com')
(u'CUSTOM_07', 'youtube.com')
(u'CUSTOM_08', 'youtube.com')
(u'CUSTOM_15', 'test.com')
(u'CUSTOM_16', 'test.com')
(u'CUSTOM_17', 'test.com')
(u'CUSTOM_18', 'test.com')
(u'CUSTOM_19', 'test.com')
(u'CUSTOM_20', 'youtube.com')
(u'CUSTOM_23', 'test.com')
(u'CUSTOM_24', 'youtube.com')

```

Code for Attempt 2#:

```
for x in data :
    for s in x['urls']:
        url = str(s)
        matching = [y for y in fileURLs if url in y]
        if (matching):
            print(x['id'], x['configuredName'], matching)

```

Output for Attempt 2#:

```
Here is the URLs in the File which needs to be search in the List.
['www.youtube.com', 'www.test.com', 'www.123.com']
(u'CUSTOM_03', ['www.test.com'])
(u'CUSTOM_03', ['www.test.com'])
(u'CUSTOM_05', ['www.youtube.com'])
(u'CUSTOM_07', ['www.test.com'])
(u'CUSTOM_07', ['www.youtube.com'])
(u'CUSTOM_08', ['www.youtube.com'])
(u'CUSTOM_10', ['www.youtube.com'])
(u'CUSTOM_15', ['www.test.com'])
(u'CUSTOM_16', ['www.test.com'])
(u'CUSTOM_17', ['www.test.com'])
(u'CUSTOM_18', ['www.test.com'])
(u'CUSTOM_19', ['www.test.com'])
(u'CUSTOM_20', ['www.youtube.com'])
(u'CUSTOM_22', ['www.test.com'])
(u'CUSTOM_23', ['www.test.com'])
(u'CUSTOM_24', ['www.test.com'])
(u'CUSTOM_24', ['www.youtube.com'])
(u'CUSTOM_02', ['www.test.com'])
(u'CUSTOM_02', ['www.123.com'])

```

See the difference between the Two attempts , where I have changed FileURL From :`FileURL = ['youtube.com', 'test.com', '123.com']`
to `FileURL = ['www.youtube.com', 'www.test.com', 'www.123.com']`

Which adds in two new entries in the output that is :

```
(u'CUSTOM_02', ['www.test.com'])
(u'CUSTOM_02', ['www.123.com'])

```