From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: displaying control characters/regex help
Date: Thu, 09 Nov 2006 11:59:34 -0700 [thread overview]
Message-ID: <eivts5$mnt$1@sea.gmane.org> (raw)
In-Reply-To: <u64dpmw2m.fsf@hotmail.com>
Peter wrote:
> Hi - I'd like to know if Emacs has the ability to display control
> (non-printing) characters (as in Word, where it is possible to hit a
> button and see representations of all the non-printing characters).
See the Text Display node of the Emacs manual, and follow its reference
to the Display Tables node of the Emacs Lisp manual and its subnodes.
> I
> may not actually need it for the problem I'm working on, but it would
> be nice to know - what I'm actually trying to accomplish is a global
> search-and-replace...I'm looking to replace:
>
> Any amount of whitespace (spaces, tabs, carriage returns), followed by
> either one or two digits, followed by any amount of whitespace,
> followed by a fixed string, followed by (possibly) more
> whitespace. There would be regular text (word characters) on either
> side of this regex region. (I'm trying to clean up a document that was
> saved-as-text from Acroread, that had a page number and a fixed footer
> on each page).
>
> Sample:
>
> -----boundary-----
>
> 34
>
>
> My string is quite stringy.
>
>
> -----boundary-----
>
> I want to replace the entire mess between the boundaries with just a
> carriage return.
C-M-% \s-*[0-9]\{1,2\}\s-*My SPC string SPC is SPC quite SPC stringy
\s-* RET C-q C-j RET
If you want to match the fixed string exactly, use `C-q SPC' instead of
just `SPC'.
--
Kevin
prev parent reply other threads:[~2006-11-09 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 22:07 displaying control characters/regex help Peter
2006-11-09 18:59 ` Kevin Rodgers [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='eivts5$mnt$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/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).