The conversation between human and AI assistant.
[|Human|] Construct a Regex statement to extract the links from given text.
[|AI|] ```
import re

text = "The following page has a list of useful links: www.example.com/links"
pattern = r"http\S+|www\S+"

links = re.findall(pattern, text)

print(links)
```
[|Human|] 
Construct a Regex statement to extract the links from given text.