The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 10-03-2006
ghostdog74 ghostdog74 is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2006
Posts: 2,557
Alternative in Python:


Code:
s = '/excite/homepagepoll/ans_jan24_02.oft: <IMG SRC="http://a88.g.akamai.net/f/88/606/1d/image.lovesluudf.com/people/images/global/poll/popuptop.gif" WIDTH="468" HEIGHT="62" BORDER="0">'
splitted = s.split(":",1)
homepage,  = splitted[0]
urlpage = splitted[1].split()[1].replace('SRC="',"").replace('"',"")
final = homepage + ":" + urlpage
print final