python3去除字符串中括号及括号里面的内容
a = """ <option value="search-alias=arts-crafts-intl-ship">Arts & Crafts</option> <option value="search-alias=automotive-intl-ship">Automotive</option> <option value="search-alias=baby-products-intl-ship">Baby</option> """ print(re.sub('\\<.*?\\>','',a))
#输出结果为:
Arts & Crafts
Automotive
Baby