我需要匹配和之间的内容###
,###
现在我的正则表达式我想出了“作品”,但我也在开始和结束时使用新行来获取内容,这让我的生活非常复杂。
这是我的正则表达式:
(?<=\#\#\#)[\w\W]*?(?=\#\#\#)
我想知道我可以只匹配内容,而不匹配新行。
一些示例文本:
###
stackoverflow.com - penguin;stackoverflow;html;nospin
http://stackoverflow.com
Writing the perfect question
How to ask questions the smart way
Help vampires
How to ask a question
###
stackoverflow.com - pyramid;stackoverflow;bb;spin
http://stackoverflow.com
Writing the perfect question
How to ask questions the smart way
Help vampires
How to ask a question
###
stackoverflow;stackoverflow;wiki;nospin
http://stackoverflow.com
Writing the perfect question
How to ask questions the smart way
Help vampires
How to ask a question
###
stackoverflow;stackoverflow;bb;spin
http://stackoverflow.com
Writing the perfect question
How to ask questions the smart way
Help vampires
How to ask a question
###