在多个文件中搜索多个单词 [英] Searching for more than one word in multiple files

查看:102
本文介绍了在多个文件中搜索多个单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功创建了一个程序,可以在多个文件中搜索单词,但现在我需要能够通过多个单词进行搜索。我已经将之前讨论的代码添加到我的原始程序中,但我不确定它们应该如何组合在一起。有人可以为我清除这个吗?

I have successfully created a program that searches for a word in multiple files but now I need to be able to search by more than one word. I have add code from a previous discussion to my original program but I am unsure how they should fit together. Can someone clear this up for me?

展开 | 选择 | Wrap | 行号

推荐答案


我已经成功创建了一个在多个文件中搜索单词的程序,但现在我需要能够通过多个单词进行搜索。我已经将之前讨论的代码添加到我的原始程序中,但我不确定它们应该如何组合在一起。有人可以为我清除这个吗?

I have successfully created a program that searches for a word in multiple files but now I need to be able to search by more than one word. I have add code from a previous discussion to my original program but I am unsure how they should fit together. Can someone clear this up for me?

展开 | 选择 | Wrap | 行号


这是我现在拥有的。它搜索就好了但是当我添加第二个单词时它会给我一个错误。我添加了一个print语句,看它是否正在分割输入,它是。我列出了我一直在底部的错误。我无法弄清楚出了什么问题。

感谢您的帮助。

Here is what I have now. It searchs on just fine but when I add a second word it gives me an error. I added a print statement to see if it was splitting the input and it is. I have listed the error I keep getting at the bottom. I can''t figure out what is wrong.
Thanks for all your help.

展开 | 选择 | Wrap | 行号



这是我现在拥有的。它搜索就好了但是当我添加第二个单词时它会给我一个错误。我添加了一个print语句,看它是否正在分割输入,它是。我列出了我一直在底部的错误。我无法弄清楚出了什么问题。

感谢您的帮助。

Here is what I have now. It searchs on just fine but when I add a second word it gives me an error. I added a print statement to see if it was splitting the input and it is. I have listed the error I keep getting at the bottom. I can''t figure out what is wrong.
Thanks for all your help.

展开 | 选择 | Wrap | 行号


这篇关于在多个文件中搜索多个单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆