okay i found this regex from Stack overflow, which can isolate the URL and ID, but when ever i tried to use it in app engine (py) an error popup saying “nothing to repeat, i know theres a bug in Python regarding this regex repeating, can anyone fix this? tx
File "C:\Program Files\Python27\lib\re.py", line 244, in _compile
raise error, v # invalid expression
error: nothing to repeat
sample code
# patt = '(?:http:\/\/)?(?:www.)?facebook.com\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[?\w\-]*\/)?(?:profile.php\?id=(?=\d.*))?([\w\-]*)?'
# tst = self.request.get("form_fbURL")
# m=re.match(patt,tst)
im not a good python programmer anyway 🙂
There is a
urlparsemodule to parse url.The
urlparsemodule is renamed tourllib.parseinPython 3.0.