From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?utf-8?q?R=C3=B6hler?= Newsgroups: gmane.emacs.help Subject: Re: RegExp: match everything except a certain string Date: Tue, 20 Nov 2007 18:50:02 +0100 Message-ID: <200711201850.02854.andreas.roehler@online.de> References: <87fxz0j3wc.fsf@kamaloka.dhatu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1195580989 26795 80.91.229.12 (20 Nov 2007 17:49:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Nov 2007 17:49:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 20 18:49:52 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 1IuXED-0002ZD-BC for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Nov 2007 18:49:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuXDz-0008OG-2h for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Nov 2007 12:49:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IuXDe-0008Mx-8M for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 12:49:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IuXDc-0008Ls-TC for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 12:49:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IuXDc-0008Lc-KB for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 12:49:04 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.174]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IuXDc-0004LS-Al for help-gnu-emacs@gnu.org; Tue, 20 Nov 2007 12:49:04 -0500 Original-Received: from noname (p54BEBEB5.dip0.t-ipconnect.de [84.190.190.181]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1IuXDb0Jxt-0004zp; Tue, 20 Nov 2007 18:49:03 +0100 User-Agent: KMail/1.9.5 In-Reply-To: <87fxz0j3wc.fsf@kamaloka.dhatu> Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX1/MSNuSNLEyncysUrF6oS3Ro+bIoP2iigHNXhY cEtjH/4qHxsWFap0h3d8Ys9Qg8XvLx/5A9s7IvHbgDlUkbnSDS 8t+BwYXeEyxLX2YgSssIQ== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:49362 Archived-At: Am Dienstag, 20. November 2007 17:08 schrieb Sven Bretfeld: > Hello to all > > A RegExp beginner's question again. I cannot find a way to search for > a regexp that matches everything except of one certain string. The > problem is: > > author =3D {somename}, > editor =3D {}, > title =3D {sometitle}, > subtitle =3D {}, > series =3D {}, > url =3D {} > > I want to find a regexp that matches every line with empty {} except > of the "subtitle line". I've come that far: > > ^ \<[^s].* =3D {},* > > But this one also excludes the "series line", of course. I was > thinking of \<[^s][^u] but this doesn't work, since, then, the initial > s of "subtitle" is matched again. > > What is the syntax for find .* except of the string "subtitle"? I > didn't recognize this in the Lisp info. > > Thanks for help > > Sven Got it with: [^s]?[^u]?[^b]?[^t]?[^i]?[^t]?[^l]?[^e] =3D {},?$ Please don't ask why :) Anyway--you will know that and it's not the precise answer-- it might be useful to point at M-x shell-command-on-region grep {} | sed /subtitle/d as an easy-to-use solution. Andreas R=C3=B6hler