我有一些文本文件,我想根据我放在各行开头的任意“标签”将它们分成不同的文件。
示例文本文件:
I CELEBRATE myself, and sing myself,
And what I assume you shall assume,
For every atom belonging to me as good belongs to you.
#here I loafe and invite my soul,
#here I lean and loafe at my ease observing a spear of summer grass.
#there My tongue, every atom of my blood, form'd from this soil, this air,
#there Born here of parents born here from parents the same, and their parents the same,
#here I, now …
Run Code Online (Sandbox Code Playgroud)