在文本文件中搜索特定单词 [英] searching a particular word in a text file

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

问题描述

任何人都可以帮助我阅读代码以读取文本文件或PDF文件并搜索特定单词并在jsp的textarea中显示.....

Can any one help me out in the code for reading a text file or PDF file and search a particular word and display in textarea in jsp .....

推荐答案

搜索文本文件非常容易,只需完整或逐行读取文件,然后扫描所需的单词或样式即可.使用PDF,您首先需要找到一个库(或编写您自己的库)来提取数据,因为它不是简单的文本流.请访问Adobe网站,获取有关PDF文件结构的最新文档,或访问Google以获取免费库.
Searching a text file is easy, just read the file in its entirety or line by line and scan for the word or pattern you need. With PDF you will first need to find a library (or write your own) for extracting the data, as it is not a straightforward text stream. Try the Adobe web site for the latest documentation on PDF file structure, or Google for free libraries.


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

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