正则python正则,提取\t\n里面的大写英文字母

 

ss = '['\r\n\t\t\t\t\t\t\t\t\t', '\r\n\t\t\t\t\t\t\t', '\r\n\t\t\t\t\t\t\t\t\tCMA CGM JACQUES JOSEPH 7\r\n\t\t\t\t\t\t\t', '\r\n\t\t\t\t\t\t\t\t', '\r\n\t\t\t\t\t\t\t', '\r\n\t\t\t\t\t\t\t\t-\r\n\t\t\t\t\t\t']'

result = ''.join(re.findall(r'([A-Z].*[0-9]|[A-Z].*[A-Z])', vessel))

>>>>CMA CGM JACQUES JOSEPH 7

 

posted @ 2019-01-31 20:16  AngDH  阅读(2992)  评论(0编辑  收藏  举报