View Single Post
Old 09-11-2025, 01:44 PM   #2
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 172
Karma: 1497966
Join Date: Jul 2021
Device: N/A
I suppose you are using the ctrl-n in a search/replace to count the occurrences of "word" in the current file or in the text ?
In that case, you could use a particular tag or class to mark the words you want to ignore.

For exemple, with the tag <small>:
Pass this regex with a Negative Lookbehind:
(?<!<small>)marked-word
on the text:
this marked-word will be counted, but this <small>marked-word</small> won't

Ctrl-n will give 1

Of course, you could use a <span class="ignored"> as well, with the convenient style in the css (a snippet can be used to insert it easily)
lomkiri is offline   Reply With Quote