これを使用して、(?sm)^.*?\.$
私のテキストからすべての段落を取得します。しかし、テキストの最後に「スペース」がある場合、最後の段落は一致しません。これを修正するために何を使用しなければなりませんか?Regex - テキストをウォークしない段落に分割します。
例:私は私の学校のプロジェクトに取り組んできたので、私は((?:[^\n][\n]?)+)
を使用
Copyright laws are changing all over the world. Be sure to check the
copyright laws for your country before downloading or redistributing
this or any other Project Gutenberg eBook.
This header should be the first thing seen when viewing this Project
Gutenberg file. Please do not remove it.
Please read the "legal small print", and other information about the
eBook and Project Gutenberg at the bottom of this file.
'(?sm)^。*?\。\ s * $' ...? – brso05
ヒント: '\。$'とはどういう意味ですか? – VGR
https://regex101.com/r/RLu2bv/1 – brso05