>>723
re.sub(r'(<[0-9]+>)|[<>]', r'\1', '[<< ><test<<012>>name1><> >]')

>>507のパターン
これ使い勝手良いね