匹配两个文本文件中的字符串,并在Clojure中进行过滤
我的问题几乎可以在下面的链接上回答。但是,我对以下问题有略有补充(请检查“类似问题”)。
问题
的 删除了文件夹,仅应在输出中列出此文件夹(此文件夹的内容不应另外列出)。例如:
/fotos/nope-2018/globe
/fotos/fotos/nope-2018/globe/dc-40.jpg
/fotos/nope-2018/globe/globe/dc-41.jpg
之前/fotos/nope-2018/globe/globe/dc-42.jpg
之前/fotos/nope-2018/globe/globe/dc-43.jpg
如果删除了以/globe(包括/globe)开头的所有文件,则输出不应包含所有项目,而应仅包含“ globe”。如何实现这一目标,以实现给定链接中先前问的问题?
任何帮助都将受到赞赏。
My question is almost answered at the below link. However, I have a slight addition to the below question (Please check the "Similar Question").
My question is that:
If an entire folder was deleted, only this folder should be listed in the output (the content of this folder should not be listed additionally). As an example:
before/Fotos/Nope-2018/globe
before/Fotos/Nope-2018/globe/dc-40.jpg
before/Fotos/Nope-2018/globe/dc-41.jpg
before/Fotos/Nope-2018/globe/dc-42.jpg
before/Fotos/Nope-2018/globe/dc-43.jpg
If all the files starting with /globe (including /globe) is deleted, the output should not contain all the items but only "globe". How to achieve this as an addition to achieving the previously asked question in the given the link?
Any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在做一些假设:
您可以将“类似问题”的输出输出并后处理,以使所得集合中的任何元素都不是其他任何元素的前缀substring。
以下显示了实现这一目标的一种方法。
I'm making a few assumptions:
You can take the output of the "Similar Question" and post-process it such that no element of the resultant collection is a prefix substring of any other element.
The following shows one way of accomplishing that.