RECENT POSTS

P5-text-context

May 26, 2018

Handle highlighting search result context snippets

Given a piece of text and some search terms, produces an object which locates the search terms in the message, extracts a reasonable-length string containing all the search terms, and optionally dumps the string out as HTML text with the search terms highlighted in bold.

WWW http//search.cpan.org/dist/Text-Context/