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!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
A Paragraph is a distinct section of a piece of writing,indicated by a new line, indentation, or numbering
So,you can do this
(\n|^).*?(?=\n|$)
Use this regex
with singleline option