Page 1 of 1

Determine number of occurence of a word

Posted: Fri Aug 16, 2002 2:46 pm
by dilip.trivedy
Hi,
How do i get the total count of occurence of a keyword with in an indexed document?
I have a indexed HTML document and it has a word "PRINTER" 10 times. How do i determine if the word "PRINTER" is appearing as heading or as normal text with in a paragraph?

Determine number of occurence of a word

Posted: Fri Aug 16, 2002 3:51 pm
by mark
You basically need to extract the word(s) and count them. Maybe something like
<rex "printer" $text><count $ret><$nprinters=$ret>
I assume you mean "title" when you say heading. Title is extracted separate from the body text with <urlinfo title>.