我需要在tab(\ t)和新行(\ n)之间隔离文本。不要删除“\ n”和“\ t”,只需抓取文本和任何其他字符,如“&”或“()”或“/”
以下是文字示例:
u'\n\t\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\tMilitary & Police Communication Headsets, Hearing Protectors & Accessories\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\tMilitary Airfield / Shelter / Water Heating Solutions\n\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\tPhotonic / Optical Products & Solutions Serving the Defence & Aerospace Markets\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t',
u'\n\t\t\t\t\t\t\t\t\t',
尝试了许多不同的组合后,这是我能得到的最接近的组合:
[^\\n][^\\t]
我希望能得到一些帮助。