阅读背景:

在文本文件(Ruby)中搜索特定单词时显示周围的单词

来源:互联网 

I'm very new to ruby. I'm trying to search for any instance of a word in a text file (not the problem). Then when the word is discovered, it would show the surrounding text (maybe 3-4 words before and after the target word, instead of the whole line), output to a list of instances and continue searching. I'm very new to ruby. I'm trying to search for




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: