regexp = "application-icon-\d+:'(\S+)'"#或者是下面这个#regexp = "application-icon-\d+:'([a-z\-./_]+)'"m = re.search(regexp,line)if m: print m.groups()