Determine number of occurence of a word

Post Reply
dilip.trivedy
Posts: 1
Joined: Fri Aug 16, 2002 2:40 pm

Determine number of occurence of a word

Post 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?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Determine number of occurence of a word

Post 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>.
Post Reply