From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ruslan Spivak Newsgroups: gmane.emacs.help Subject: Re: How to search with 'Match case' and 'Match whole word'? Date: Sat, 14 Jul 2007 01:57:59 +0300 Message-ID: References: <1184352587.368019.212300@g12g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184367522 5269 80.91.229.12 (13 Jul 2007 22:58:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2007 22:58:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 14 00:58:39 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 1I9U5v-000754-6Y for geh-help-gnu-emacs@m.gmane.org; Sat, 14 Jul 2007 00:58:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I9U5u-0001uD-KF for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jul 2007 18:58:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I9U5d-0001q1-K1 for help-gnu-emacs@gnu.org; Fri, 13 Jul 2007 18:58:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I9U5b-0001nV-Fw for help-gnu-emacs@gnu.org; Fri, 13 Jul 2007 18:58:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I9U5b-0001nO-Ca for help-gnu-emacs@gnu.org; Fri, 13 Jul 2007 18:58:19 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I9U5a-0008LD-Qd for help-gnu-emacs@gnu.org; Fri, 13 Jul 2007 18:58:19 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1I9U5T-0001Pm-NU for help-gnu-emacs@gnu.org; Sat, 14 Jul 2007 00:58:11 +0200 Original-Received: from 108-141-124-91.pool.ukrtel.net ([91.124.141.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jul 2007 00:58:11 +0200 Original-Received: from ruslan.spivak by 108-141-124-91.pool.ukrtel.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Jul 2007 00:58:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 108-141-124-91.pool.ukrtel.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:Re8NNFwY7N3ptkfkOrFRmnhyFBQ= 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:45674 Archived-At: Vols writes: > Hi, group, > > I tried to find all the ' / ' inside my codes and I used C-s / > > All the ' /* */ ' and '//' show up. How to search with 'Match > whole word'? > > How about for the 'match case' search? > Hi, I guess what you are looking for is regexp search. You can use incremental regexp search with C-M-s and enter regular expression corresponding to your needs or use M-x occur again with regexp to show all occurrences at once. case-fold-search variable determines whether searches are case sensitive. You can temporarily change its value in your current buffer with M-x set-variable ENTER case-fold-search ENTER nil ENTER Foregoing will make search operations case sensitive BTW, by default search is not case sensitive unless you type in mixed case or uppercase and if you do that Emacs understands that you want to make case sensitive search. Ruslan -- "The evil that is in the world almost always comes of ignorance, and good intentions may do as much harm as malevolence if they lack understanding." -- Albert Camus