使用Regex以相反的顺序从python字符串中废弃内容

时间:2017-03-23 09:51:41

标签: python regex

我从html页面获得了以下内容 str='http://www.ralphlauren.com/graphics/product_images/pPOLO2-24922076_alternate1_v360x480.jpg\', zoom: \'s7-1251098_alternate1\' }]\n\n\nEnlarge Image\n\n\n\n\n\n\nCotton Canvas Utility Jacket\nStyle Number : 112933196\n\n\n\n$125.00'

就像这样,我有很多html页面。我需要一些方法来阅读style number之前的内容。在这种情况下,我需要Cotton Canvas Utility Jacket。 python中有正则表达式吗?请注意,我可以开始查找模式Enlarge Image并阅读Style number之前的所有内容。问题是html页面上有很多Enlarge Image。我上面显示的是html页面的一部分。完整的html页面是here

简而言之,我需要从链接的HTML页面中找到产品名称。 感谢。

0 个答案:

没有答案