perl Phrase.pl
Show brief usage Please refer ``brief usage'' for options.
perl Phrase.pl Search+Phrase-NotThis [Options] >outfile.htm
Search for paragraphs that contain ``Search'' and/or ``Phrase'' but not ``NotThis''
perl phrase.pl "th(is|at)+th[eo]se" -e txt >outfile.htm
Search all the .txt files for paragraphs that contain ``this'' and/or ``that'', ``these'', ``those''
perl phrase.pl "\bc\b-\bc\+\++pascal"
If you know perl, than you would know \b. This search means search for whole-word-only C and Pascal but does not want C++
GREP form Borland TS from Norton Utility
I use grep extensively. It does excellent job when I search for program lines. But it can not highlight the keywords found. And, it lacks the context when I search for an idea or something.
So I turn to TS from time to time. It overcomes the above two grep's drawbacks, but it introduces other nuisances: It requires too much user interaction. I have to press far too many 'Y's before I can skip a file I am not care. And I can't refer back what I've searched.
So, here is my solution to it -- My phrase search.pl, A perl script that grep on certain files in certain dir for certain phrases on paragraph based. FREE!
Phrase.pl: A full text searching perl script. Paragraph based search for keyword phrases output (into html file) with found keyword emphasized. Support regular expressions and perl extended regular expressions. Smart algorithm that combine ``and'' ,``or'' together. Sufficient and efficient.
search on *paragraph
basis* instead of line basis on each
file.
# Bug ? opendir can't work when specified with any '/' or '\' # can only work with . or .. and even : ...
([undefined]) ? opendir(DIR,"e:/.") (1) ? closedir(DIR) (1) ? opendir(DIR,'e:/.') (1) ? opendir(DIR,'e:/') ([undefined]) ? opendir(DIR,'e:\') Can't find string terminator "'" anywhere before EOF ([undefined]) ? opendir(DIR,'e:\\') ([undefined]) ? exit
perl phrase.pl chomp -e pl >chomp.htm
Here comes the result. It is really quick! http://www.geocities.com/SiliconValley/Lakes/2659/chomp.htm
This program is FREEWARE, but requires you to register -- just send me an email :-). I want to know where my program goes.
To: suntong _at_ geocities -dot- com Subject: Register Phrase <Your Country> <Your state> Body: <Maybe blank, Any comments, bug reports, etc, are welcome>
Comments:
This page is automatically generated by pod2html from perl -- http://www.perl.com