On 4 A ustos, 00:41, Ehsan <[EMAIL PROTECTED]> wrote: > I want to find "http://www.2shared.com/download/1716611/e2000f22/ > Jadeed_Mlak14.wmv?tsid=20070803-164051-9d637d11" or 3gp instead of > wmv in the text file like this : > <html> > ""some code"" > function reportAbuse() { > var windowname="abuse"; > var url="/abuse.jsp?link=" + "http://www.2shared.com/file/1716611/ > e2000f22/Jadeed_Mlak14.html"; > OpenWindow = > window.open(url,windowname,'toolbar=no,scrollbars=no,resizable=no,width=500,height=500,left=50,top=50'); > OpenWindow.focus(); > } > function startDownload(){ > window.location = "http://www.2shared.com/download/1716611/ > e2000f22/Jadeed_Mlak14.wmv?tsid=20070803-164051-9d637d11"; > //document.downloadForm.submit(); > } > </script> > </head> > </html>http://www.2shared.com/download/1716611/e2000f22/ > Jadeed_Mlak14.3gp?tsid=20070803-164051-9d637d11"sfgsfgsfgv > > I use this pattern : > "http.*?\.(wmv|3gp).*"" > > but it returns only 'wmv' and '3gp' instead of "http://www.2shared.com/ > download/1716611/e2000f22/Jadeed_Mlak14.wmv? > tsid=20070803-164051-9d637d11" > > what can I do? what's wrong whit this pattern? thanx for your comments
You could use r'window.location = "(.*?\.(wmv|3gp)";' as your regex string, I guess.. -- http://mail.python.org/mailman/listinfo/python-list