From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?=22Wilfred_Zegwaard_=28priv=E9=29=22?= Newsgroups: gmane.emacs.help Subject: Fuzzy search (was: Counting words) Date: Thu, 12 Apr 2007 23:06:30 +0200 Message-ID: <461E9F56.6040803@home.nl> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1176412026 4116 80.91.229.12 (12 Apr 2007 21:07:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Apr 2007 21:07:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 12 23:07:03 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hc6VT-0006FD-0Y for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Apr 2007 23:07:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hc6Zf-0003lf-10 for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Apr 2007 17:11:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hc6ZQ-0003ix-3v for help-gnu-emacs@gnu.org; Thu, 12 Apr 2007 17:11:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hc6ZO-0003ef-6N for help-gnu-emacs@gnu.org; Thu, 12 Apr 2007 17:11:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hc6ZN-0003eG-Qh for help-gnu-emacs@gnu.org; Thu, 12 Apr 2007 17:11:05 -0400 Original-Received: from smtpq3.tilbu1.nb.home.nl ([213.51.146.202]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hc6VA-0007BO-Q6 for help-gnu-emacs@gnu.org; Thu, 12 Apr 2007 17:06:45 -0400 Original-Received: from [213.51.146.188] (port=50018 helo=smtp3.tilbu1.nb.home.nl) by smtpq3.tilbu1.nb.home.nl with esmtp (Exim 4.30) id 1Hc6V8-00039i-Oa for help-gnu-emacs@gnu.org; Thu, 12 Apr 2007 23:06:42 +0200 Original-Received: from [84.31.187.8] (port=1332 helo=[84.31.187.8]) by smtp3.tilbu1.nb.home.nl with esmtp (Exim 4.30) id 1Hc6V4-0002YF-QT for help-gnu-emacs@gnu.org; Thu, 12 Apr 2007 23:06:38 +0200 User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) In-Reply-To: X-AtHome-MailScanner-Information: Neem contact op met support@home.nl voor meer informatie X-AtHome-MailScanner: Found to be clean X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42625 Archived-At: 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