From: Cecilio Pardo <cpardo@imayhem.com>
To: henry atting <nspm_01@literaturlatenight.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: rexexp help needed
Date: Fri, 26 Dec 2008 17:53:40 +0100 [thread overview]
Message-ID: <814p0qkhd7.fsf@imayhem.com> (raw)
In-Reply-To: <87bpuzaugu.fsf@literaturlatenight.de> (henry atting's message of "Fri, 26 Dec 2008 15:20:49 +0100")
henry atting <nspm_01@literaturlatenight.de> writes:
> Hi,
>
> I am trying to build a rexexp that does the following:
> I have a text file where I want to replace
>
> Medicine:One:Two €12.00
>
> With
>
> Medicine €12.00
>
> Because I have more than one entry `Medicine' (and they
> differ slightly, something like `Medicine:Three:Four' and
> so on) I have to do it with `quere-replace-regexp'.
> With regexp-builder I found this:
>
> Medicine:.*[^€.0-9]
>
> This works both in regexp-builder and a scratch buffer, but
> unfortunately not in a file. If applied on a file replace-regexp
> strips everything from the first `:'.
>
>
> Kind regards
> henry
>
I think that regexp should be
Medicine:[^€.0-9]*
if you want to match the whole line except the price.
prev parent reply other threads:[~2008-12-26 16:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-26 14:20 rexexp help needed henry atting
2008-12-26 14:51 ` Lennart Borgman
[not found] ` <mailman.3376.1230303090.26697.help-gnu-emacs@gnu.org>
2008-12-26 16:17 ` henry atting
2008-12-26 17:11 ` Lennart Borgman
2008-12-26 23:04 ` Thierry Volpiatto
[not found] ` <mailman.3380.1230311518.26697.help-gnu-emacs@gnu.org>
2008-12-26 17:46 ` henry atting
[not found] ` <mailman.3378.1230308108.26697.help-gnu-emacs@gnu.org>
2008-12-26 16:54 ` harven
2008-12-26 16:53 ` Cecilio Pardo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=814p0qkhd7.fsf@imayhem.com \
--to=cpardo@imayhem.com \
--cc=help-gnu-emacs@gnu.org \
--cc=nspm_01@literaturlatenight.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).