Perl Monks
Description: Website for seekers of perl wisdom.
http://www.perlmonks.com
Category: computers and internet >> programming >> perl
the bolding process is done withing search cgi, that looks like:
# This reg expression will do the trick, and doesn't bold things insid +e <> tags such as # URL's. $link_results =~ s,(<[^>]+>)|(\Q$term\E),defined($1) ? $1 : "<b>$2</b> +",gie;
one problem is when you search for the words 'description' or 'category'. the link results thing also bolds Description: and Category:, which i dont want. to paint the picture clearly:
Yahoo!
Description: Directory of websites each with a description and classified by category.
http://www.yahoo.com
Category: computers and internet >> search engines
each link result also depends on a template called searchlink.html.
it so happened that search.cgi takes it so literally that it bolds everything at its own discretion.
I wonder if there is anything i can do to have only the vital information bolded. actually i would only want the title and description matches bolded and nothing else (not even in the category or url). i believe the code i provided bolds something based on a pattern but apparently it doesn't work and i don't understand how it works, except that it looks for a certain pattern and bolds it. i wonder if i could do something similar like that. an explanation will be greatly appreciated too. thanks, looking forward to your help:-)
drewboy
In reply to Replacement based on pattern by drewboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |