python regular expression to split paragraphs

前端 未结 5 525
执笔经年
执笔经年 2021-01-19 01:40

How would one write a regular expression to use in python to split paragraphs?

A paragraph is defined by 2 linebreaks (\\n). But one can have any amount of spaces/ta

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-19 02:04

    Are you trying to deduce the structure of a document in plain test? Are you doing what docutils does?

    You might be able to simply use the Docutils parser rather than roll your own.

提交回复
热议问题