如何获得使用了BBcode的richtext真实文本的长度?

如果一个richtext的string = “《u》《color = #ffffff》我是长度《/color》《/u》”,怎么样获得"我是长度"的具体长度