Suppose i had string as below
data = "/phones/pages/nokia_overview.aspx pid=46&cid=raj 80"
Now i want to fetch the url from the string from / up to .aspx . I mean actually there may be many strings as above, but we want to fetch the string from start and up to the extension .aspx in the string by ignoring the remaining part of the string after .aspx
Here the length of the string may vary, because sometimes the url will be bigger and sometimes small, so based on .aspx extension i want to fetch the url from the above string
can anyone let me know how can we do this in python