From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KEX0B9qGTl/YQgAA0tVLHw (envelope-from ) for ; Tue, 01 Sep 2020 17:37:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EHDHA9qGTl9saQAAbx9fmQ (envelope-from ) for ; Tue, 01 Sep 2020 17:37:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7D3D994051F for ; Tue, 1 Sep 2020 17:37:29 +0000 (UTC) Received: from localhost ([::1]:56106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDADm-0002XK-Lv for larch@yhetil.org; Tue, 01 Sep 2020 13:37:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDADI-0002Wu-DJ for emacs-orgmode@gnu.org; Tue, 01 Sep 2020 13:36:56 -0400 Received: from mail.tuxteam.de ([5.199.139.25]:60476) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1kDADF-0000nD-Nw for emacs-orgmode@gnu.org; Tue, 01 Sep 2020 13:36:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=L8W222SGB6UwlfvWcRAdNM1l0M0EOb1+8z7J4mRjtT4=; b=fskgpROGXcqe227cI/kSMdgrsjfqipbA1P3kgokeaFDJK1XiYygLNDhR5FnErj0cK9OUwP3aFofnrt/19sUJBORqXj1hmLYvv6268/L4uYww1ptffOC/4uvW885qsk+gX10NWY+BIXaFp+gNerN0G2f4nDVpb3rosJGwfd3eZEfY8ZSn0Cf1r6jEASmfnjv1SBhVvKEqCe3bXXIeifAJqnVaMmgTTEKBQUuj5OEoXhfyc5ZPMUNUAg9Igp+GNjXKqXCXaZ3Zk/w9x0vba60uya7ZApK1kkD0G5R3Ne7MgDjRKGYbOKumGi6bIanleDSh0e8xP1+NTN1Azi+XWCFb0w==; Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1kDAD7-0006QW-Vf for emacs-orgmode@gnu.org; Tue, 01 Sep 2020 19:36:46 +0200 Date: Tue, 1 Sep 2020 19:36:45 +0200 To: emacs-orgmode@gnu.org Subject: Re: Mass conversion of items Message-ID: <20200901173645.GB20966@tuxteam.de> References: <87sgc1lejc.fsf@skimble.plus.com> <20200901161420.GA20966@tuxteam.de> <87blipl8ed.fsf@skimble.plus.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: <87blipl8ed.fsf@skimble.plus.com> User-Agent: Mutt/1.5.21 (2010-09-15) From: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/01 10:59:00 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tuxteam.de header.s=mail header.b=fskgpROG; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -3.31 X-TUID: YqY2n+7TO3GK --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 01, 2020 at 06:22:02PM +0100, Sharon Kimble wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 >=20 > Thanks for replying Tomas. > writes: You're welcome :-) [...] > >> - --8<---------------cut here---------------start------------->8--- > >> \uuline{foo} > >> - --8<---------------cut here---------------end--------------->8--- [...] > >> - --8<---------------cut here---------------start------------->8--- > >> /\uuline{foo}/ > >> - --8<---------------cut here---------------end--------------->8--- [...] > Okay, being very specific, all of '\uuline{foo}' remains, but with a > forward slash at the beginning and end of '\uuline{foo}' to achieve this > '/\uuline{foo}/' Ah, got it now. Regular expressions seem to be your friends here. I'm assuming your foo is a placeholder, and varies from instance to instance. I'm further assuming the "foo"s don't contain a closing curly brace (we'd have to refine things otherwise). Try M-x (i.e. Meta-x) and then "query-replace-regexp". It asks you first for the regular expression, which will be \\uuline{[^}]*} (note the double backslash: that's because a backslash has a special meaning in regular expressions, and you have to "escape" it with another backslash; this regexp roughly states: "a backslash followed by uuline, followed by an opening curly, followed by zero or more (that's the star) characters which aren't a closing curly followed by a closing curly). You finish that part with ENTER. Then you're asked for the replacement. You enter /\&/ Which means: "a slash, followed by whatever you just matched (that's the "\&" part, only one backslash this time) and a slash. Make a backup of your file first :-) Regular expressions are very powerful, but sometimes confusing. It pays off big time to wrangle them! =20 Good luck - t --4SFOXa2GPu3tIq4H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl9Ohq0ACgkQBcgs9XrR2kbPxQCdFKvicmSql9xmnwHw8phzSKGQ CzkAnjZjUGKHFbzfV6kRQykLO8HXou34 =jY/6 -----END PGP SIGNATURE----- --4SFOXa2GPu3tIq4H--