K
Kishore
I am comparitively a newbie in Perl.
I am working a logic to display the snippets matched results of a
'keyword' from a text file just like google would do in the search
results.
I have the content of the text file in the variable $file_content.
And I have the 'keyword' in $keyword.
I need to get the string like google does when displaying the search
results..
When I match the $keyword in the $file_content, I want to also pull 5
words before and 5 words after so I can show that snippet of the file
where the matching of the keyword occurs.
I searched in the google groups for a few days, but couldn't find
anything to help me.
I really appreciate any help I can get.
Thanks!
Kishore
I am working a logic to display the snippets matched results of a
'keyword' from a text file just like google would do in the search
results.
I have the content of the text file in the variable $file_content.
And I have the 'keyword' in $keyword.
I need to get the string like google does when displaying the search
results..
When I match the $keyword in the $file_content, I want to also pull 5
words before and 5 words after so I can show that snippet of the file
where the matching of the keyword occurs.
I searched in the google groups for a few days, but couldn't find
anything to help me.
I really appreciate any help I can get.
Thanks!
Kishore