help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why are RegExps never working?


From: Sven Bretfeld
Subject: Why are RegExps never working?
Date: Sun, 11 Nov 2007 15:06:44 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux)

Hello all

I'm just a beginner in using Regexp operations. I know that Emacs
RegExps are somewhat different from those of awk etc. But I'm
using the GNU Emacs manual to look them up.

I usually need them to do some editing (isearch-forward-regexp or
query-replace-regexp) in LaTeX-files which were MS-Word files
originally. I'm using AucTeX in Emacs 22.1.50.1.

For example, I want to search every occurrence of pp. `number' (to
replace it by pp.~`number'). Instead of space, pp. can also be
followed by an end-of-line. So I think this RegExp should be correct:

pp\.[ \|$][0-9]

To my understanding, it should mean: the string pp. followed by a
group consisting of space or end-of-line followed by a number.

Alas, occurrences of pp. at the end of a line are never found. I've
also tried \n instead of $ and [ $] instead of [ \|$] -- all with the
same result.

What's my mistake?

Thanks for help

Sven

Attachment: pgprD0rCHkjyv.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]