2

I need to extract all paragraphs from a text using regxp, so I figure to match first paragraph and iterate through all others, the problem I'm facing is I'm unable to make regxp to successfully match first paragraph, I would be forever grateful for help!

4

1 回答 1

6

段落是一篇文章的不同部分,由换行、缩进或编号表示

所以,你可以这样做

(\n|^).*?(?=\n|$)

将此regex与单行选项一起使用

于 2012-11-23T14:41:08.970 回答