From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Dziulko Newsgroups: gmane.emacs.help Subject: Re: Finding C style comments using isearch-forward-regexp Date: Mon, 24 Feb 2003 13:48:52 -0500 (EST) Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <5lu1exr8zb.fsf@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1046112648 5563 80.91.224.249 (24 Feb 2003 18:50:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Feb 2003 18:50:48 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18nNgA-0001Pg-00 for ; Mon, 24 Feb 2003 19:50:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18nNf1-0000Ig-05 for gnu-help-gnu-emacs@m.gmane.org; Mon, 24 Feb 2003 13:49:07 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18nNep-0000IQ-00 for help-gnu-emacs@gnu.org; Mon, 24 Feb 2003 13:48:55 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18nNeo-0000Hm-00 for help-gnu-emacs@gnu.org; Mon, 24 Feb 2003 13:48:54 -0500 Original-Received: from klaatu.canisius.edu ([138.92.8.100]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18nNen-0000HJ-00 for help-gnu-emacs@gnu.org; Mon, 24 Feb 2003 13:48:53 -0500 Original-Received: from localhost (dziulko@localhost) by klaatu.canisius.edu (8.11.6/8.11.6) with ESMTP id h1OImq419999 for ; Mon, 24 Feb 2003 13:48:52 -0500 Original-To: help-gnu-emacs@gnu.org In-Reply-To: <5lu1exr8zb.fsf@rum.cs.yale.edu> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7078 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7078 On 21 Feb 2003, Stefan Monnier wrote: > > The regexp /*[^\(*/\)]*/ will find C comments in a non-greedy fashion. > > Does this help your stack problems? > > It will find any comment which has no *, no /, no (, no ), and no \ in > its text. I don't think that's quite what you wanted, so I presume > you slightly misunderstand the way [...] works. Check out the > manual again. > Try: /\*[^*]*\*+\([^/*][^*]*\*+\)*/