Search Term Highlighting - Perl Script

  • Posted:
  • Proposals: 1
  • Remote
  • #29736
  • Archived
Terry W. has already sent a proposal.
  • 0


Experience Level: Expert
we have an existing Perl script:

# Author: Pieter Wessels
# Purpose:
# This script will find a given set of term/s in an HTML document.
# Those occurances in the HEAD section of the document and all occurances
# within an HTML tag will be ignore (effectively this should result in only
# text visible in the browser being found). The terms found will be
# surround with a start and end tag which can be customised.
# A customisable inclusion will be made at the top and bottom of the BODY section
# which will effecively provide the user with a hyperlink to each term found.
# Parameters:
# Filename - path/name of the file which will be tagged. Note this is relative
# to the base directory set as a constant in this script. If however
# SiteURL is found in the filename it will be substituted with the
# Base Directory.
# Terms - the terms which will be sought.

This script has been modified:
a) it includes bits of HTML that would have been included through a Server-side include routine
b) it searches for and highlights terms between a single set of <!-- Searchable --> & <!-- /Searchable --> tags.

Functionality needs to be extended further - specifically the file might contain several <!-- Searchable --> & <!-- /Searchable --> tags that may or may not be nested.

The original scripts were written and adapted by a novice (me) and are well documented. I would expect that any solution presented be equally well documented.

New Proposal

Create an account now and send a proposal now to get this job.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.