unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* newb rexeg question
@ 2003-10-23 19:56 Steve Throckmorton
  2003-10-23 20:08 ` Kevin Rodgers
  2003-10-24  7:55 ` Alan Mackenzie
  0 siblings, 2 replies; 6+ messages in thread
From: Steve Throckmorton @ 2003-10-23 19:56 UTC (permalink / raw)


I know this is going to end up with me looking stupid, but why does this:

...
(re-search-forward "^[a-z]...$")
...

insist on matching the word "Abba" in this word list:

...
abates
abating
Abba
abbe
abbey
...

I would think it would find "abbe".

I'm trying to match non-capitalized, four-letter words, and this is 
ticking me off.  Please tell me what I'm missing.

Thanks,
Steve T.
Stockbridge GA

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

* Re: newb rexeg question
  2003-10-23 19:56 newb rexeg question Steve Throckmorton
@ 2003-10-23 20:08 ` Kevin Rodgers
  2003-10-24  7:55 ` Alan Mackenzie
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Rodgers @ 2003-10-23 20:08 UTC (permalink / raw)


Steve Throckmorton wrote:

> I know this is going to end up with me looking stupid, but why does this:
> 
> ...
> (re-search-forward "^[a-z]...$")
> ...
> 
> insist on matching the word "Abba" in this word list:
> 
> ...
> abates
> abating
> Abba
> abbe
> abbey
> ...
> 
> I would think it would find "abbe".
> 
> I'm trying to match non-capitalized, four-letter words, and this is 
> ticking me off.  Please tell me what I'm missing.

C-h v case-fold-search


-- 
Kevin Rodgers

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

* RE: newb rexeg question
@ 2003-10-23 20:25 Bingham, Jay
  0 siblings, 0 replies; 6+ messages in thread
From: Bingham, Jay @ 2003-10-23 20:25 UTC (permalink / raw)


On: Thursday, October 23, 2003 2:57 PM Steve Throckmorton wrote:

> ... why does this:
> 
> ...
> (re-search-forward "^[a-z]...$")
> ...
> 
> insist on matching the word "Abba"

Because the variable `case-fold-search' is not set to `nil'.  Read about
search and case in info.  (C-h i mem [ret] msea [ret] msea [ret])

Newbies should really make friends with the info pages.

-_
J_)
C_)ingham
.    HP - NonStop Austin Software & Services - Software Quality
Assurance
.    Austin, TX
. "Language is the apparel in which your thoughts parade in public.
.  Never clothe them in vulgar and shoddy attire."     -Dr. George W.
Crane-

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

* Re: newb rexeg question
  2003-10-23 19:56 newb rexeg question Steve Throckmorton
  2003-10-23 20:08 ` Kevin Rodgers
@ 2003-10-24  7:55 ` Alan Mackenzie
  2003-10-24 19:19   ` David Vanderschel
  1 sibling, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2003-10-24  7:55 UTC (permalink / raw)


Steve Throckmorton <ttwelve@yahoo.com> wrote on Thu, 23 Oct 2003 15:56:53
-0400:
> I know this is going to end up with me looking stupid, but why does
> this:

> ...
> (re-search-forward "^[a-z]...$")
> ...

> insist on matching the word "Abba" in this word list:

> ...
> abates
> abating
> Abba
> abbe
> abbey
> ...

> I would think it would find "abbe".

> I'm trying to match non-capitalized, four-letter words, and this is 
> ticking me off.  Please tell me what I'm missing.

> Thanks,
> Steve T.
> Stockbridge GA

Interactive searches are, by default, case-insensitive.  There's some
option somewhere you can set to change this.  Or, better, to set it on a
case by case basis (pun intended), type M-c whilst entering your search
string.

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

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

* Re: newb rexeg question
  2003-10-24  7:55 ` Alan Mackenzie
@ 2003-10-24 19:19   ` David Vanderschel
  2003-10-24 19:59     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: David Vanderschel @ 2003-10-24 19:19 UTC (permalink / raw)


"Alan Mackenzie" <none@example.invalid> wrote in message
news:<fulanb.v5.ln@acm.acm>...
> Interactive searches are, by default, case-insensitive.

Only if you enter lower case only.  If you enter any
upper case character, then case does matter.

>There's some option somewhere you can set to change
>this.

which others have already suggested.

>Or, better, to set it on a case by case basis (pun
>intended), type M-c whilst entering your search
>string.

There is no M-c in isearch-mode-map.  Typing M-c will
knock you out of isearch mode and capitalize whatever
character point is on.

Regards,
  David V.

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

* Re: newb rexeg question
  2003-10-24 19:19   ` David Vanderschel
@ 2003-10-24 19:59     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2003-10-24 19:59 UTC (permalink / raw)


>> Interactive searches are, by default, case-insensitive.
> Only if you enter lower case only.  If you enter any
> upper case character, then case does matter.

Note that the OP used a non-interactive search, where the presence
of capital letters in the search string has no effect.

>> Or, better, to set it on a case by case basis (pun
>> intended), type M-c whilst entering your search
>> string.

> There is no M-c in isearch-mode-map.

BZZT!! Thanks for playing!
Please upgrade your Emacs,


        Stefan

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

end of thread, other threads:[~2003-10-24 19:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-23 19:56 newb rexeg question Steve Throckmorton
2003-10-23 20:08 ` Kevin Rodgers
2003-10-24  7:55 ` Alan Mackenzie
2003-10-24 19:19   ` David Vanderschel
2003-10-24 19:59     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2003-10-23 20:25 Bingham, Jay

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).