help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fuzzy search (was: Counting words)


From: Wilfred Zegwaard (privé)
Subject: Fuzzy search (was: Counting words)
Date: Thu, 12 Apr 2007 23:06:30 +0200
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Both methodes replace-regexp en count-matches are exact. That is not exactly what I want in the end. I'm looking for a type of fuzzy search with words which nearly exact. (Like the R statistical fuzzy search).
Eg.: the hero was here
Fuzzy search in the document, and it finds: the hero was there

It almost matches.
This is what I'm looking for. Any functions in Emacs which does the trick?

Wilfred




Wilfred Zegwaard (privé) wrote:
I found the wordcount thing.
I mean specific instances of words. The number of times eg that "the" occurs in a text. But I need to search on specific combinations, like "the exact word", but also a fuzzy search on specific combinations.

Not HTML tags, but specific strings that this package that I use calls TAGS and who are easily identifiable with a string or string combination.

Wilfred



Wilfred,

you can use replace-regexp to do this

Try
M-x replace-regexp
\bthe exact phrase\b
\&


\b means word-boundary,
\& means replace with what was found.

This is a bit nasty, but after the regexp-replace has
finished, it should echo "Replaced xx occurrences"
to the minibuffer.

HTH,
Colin S. Miller


--
Replace the obvious in my email address with the first three letters of the hostname to reply.
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.2.0/757 - Release Date: 11-4-2007 17:14






reply via email to

[Prev in Thread] Current Thread [Next in Thread]