strip tags python

后端 未结 9 1640
深忆病人
深忆病人 2020-12-17 23:07

i want the following functionality.

input : this is test  bold text  normal text
expected output: this is test normal text
9条回答
  •  生来不讨喜
    2020-12-17 23:34

    Use the webob.exc module:

    from webob.exc import strip_tags
    

    And then use it:

    print strip_tags('a
    b') >> ab

提交回复
热议问题