> For the complete documentation index, see [llms.txt](https://huataihuang.gitbook.io/cloud-atlas-draft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://huataihuang.gitbook.io/cloud-atlas-draft/develop/python/startup/strip.md).

# python过滤字符

## 使用规则替代工具re.sub

[re.sub](https://docs.python.org/2/library/re.html#re.sub)

```python
import re
line = re.sub('[!@#$]', '', line)
```

## 参考

* [Remove specific characters from a string in python](http://stackoverflow.com/questions/3939361/remove-specific-characters-from-a-string-in-python)
