0

Extracting Links From string

Hello I want to extract links from string ... I have created a code https://code.sololearn.com/cu9MsYUJS3qb/?ref=app But when I add links to it it gives me number of items.. Can you help me???

12th Feb 2023, 12:02 PM
Musaib M
Musaib M - avatar
8 odpowiedzi
+ 2
Have you editted this code since your question? It's printing out a list for me, not the number in your list.
12th Feb 2023, 4:36 PM
Justice
Justice - avatar
+ 1
But you're regex is giving the command otherwise. You're grouping, so it's giving you a list of all the groups. Have you done a lesson on Regex with Python?
12th Feb 2023, 4:40 PM
Justice
Justice - avatar
+ 1
So I would recommend you take the Python course here on SL and then you'll learn once you get to the regex part of the course.
12th Feb 2023, 4:42 PM
Justice
Justice - avatar
12th Feb 2023, 7:02 PM
Ervis Meta
Ervis Meta - avatar
0
Justice No I mean, for a single link it give many outputs something like "https", "//" etc it should give us only one link
12th Feb 2023, 4:39 PM
Musaib M
Musaib M - avatar
0
Justice for example I have give it user_input as Facebook link it should give output link only but it gives a list of many items like https // etc
12th Feb 2023, 4:40 PM
Musaib M
Musaib M - avatar
0
Not yet I just copied this from google Justice
12th Feb 2023, 4:41 PM
Musaib M
Musaib M - avatar
0
Justice thanks for your help I will look into it
12th Feb 2023, 4:45 PM
Musaib M
Musaib M - avatar