I try to Remove extra char from this URL(Please watch snapshot)
https://test.com/ABC]VR?
URL Snapshot
but I can't make it perfect URL format, and I try this code
import re p = re.compile(r'(?:w*://)?(?:.*?.)?(?:([a-zA-Z-1-9]*).)?([a-zA-Z-1-9]*.[a-zA-Z]{1,}).*') domain = 'https://test.com/ABC]VR?' print(p.match(domain))
Code Snapshot
but still, it gives output
https://test.com/ABC]x1dVx1dR?x1d
where I need output like
https://test.com/ABCVR
So, is there any build-in method in python to do that? or if need to make manually any way without regular expression? if no way without regular expression then how to do that with a regular expression?
Thank you.
1.4m articles
1.4m replys
5 comments
56.9k users