According to what i have found online, my code, using regular expressions, should isolate the part of the link i want, but it doesnt do it
import re
link = "/wiki/Automobile_(disambiguation)"
re.sub('/.*?/', "", link)
print(link)
I want the wiki thing to be removed and according to what i have seen this should do it but it doesnt
New contributor
Mihalis Halkiadakis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.