【发布时间】:2010-09-01 19:07:26
【问题描述】:
我有一个这样的字符串
somestring='in this/ string / i have many. interesting.occurrences of {different chars} that need to .be removed '
这是我想要的结果:
somestring='in this string i have many interesting occurrences of different chars that need to be removed'
我开始手动做各种.replace,但是有这么多不同的组合,我认为必须有更简单的方法。也许有一个图书馆已经这样做了?
有谁知道我如何清理这个字符串>?
【问题讨论】: