all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* RE-Builder and grep
@ 2002-05-01 11:54 Ian Swainson
  2002-05-06  8:54 ` Alexander Koptelov
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Swainson @ 2002-05-01 11:54 UTC (permalink / raw)


Hi,

I'm trying to learn regular expressions, and have been using the re-builder mode
in Emacs.

I have a text file (greptest.txt) containing the following lines:

THIS IS A TEST
this is a test
this is another test
This is a test
This is A test
this is a Test

If I do grep -e "[A-Z]" greptest.txt

The following lines are returned, as expected:

THIS IS A TEST
This is a test
This is A test
this is a Test

But if I use emacs re-builder pasting the text into a buffer, *all* lines are
highlighted, even those that don't contain any uppercade characters.  How can I
make re-builder's regular expressions work like greps, and can anyone tell me
why there is the difference?

Cheers,
Ian

-- 
fortune says:

Documentation is like sex: when it is good, it is very, very good; and
when it is bad, it is better than nothing.
		-- Dick Brandon

~~~~~~~~~~~ Made in Ireland using GNU Emacs ~~~~~~~~~~~
Ian Swainson           Kia Ora!         ian@qui-oui.com
~~~~~~~~~~~~~~~ http://www.qui-oui.com ~~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RE-Builder and grep
  2002-05-01 11:54 RE-Builder and grep Ian Swainson
@ 2002-05-06  8:54 ` Alexander Koptelov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Koptelov @ 2002-05-06  8:54 UTC (permalink / raw)
  Cc: help-gnu-emacs


This is because your re-builder is case-insensitive.

Try "\C-c\C-c" in its buffer.

HTH

-- 
Alexander Koptelov
Institute for System Programming, Russian Academy of Sciences
e-mail: steve@ispras.ru
icq:    36208499

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-06  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-01 11:54 RE-Builder and grep Ian Swainson
2002-05-06  8:54 ` Alexander Koptelov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.