* Case sensitive regexp
@ 2005-05-23 1:26 Neon Absentius
2005-05-23 17:18 ` Kevin Rodgers
0 siblings, 1 reply; 4+ messages in thread
From: Neon Absentius @ 2005-05-23 1:26 UTC (permalink / raw)
Hello,
how can I make sure that the regular expressions are case sensitive?
By looking at the manual I thought that if the expression contains
a capital letter then it automatically is case sensitive. However
evaluating (looking-at "A") when the point is before an "a" returns
true.
Thanks
--
Charity in capitalism is like urinating to extinguish a forest fire.
-- Neon Absentius
absent a.in.cirle sdf period lonestar period org
SDF Public Access UNIX System - http://sdf.lonestar.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Case sensitive regexp
[not found] <mailman.1370.1116812606.25862.help-gnu-emacs@gnu.org>
@ 2005-05-23 2:46 ` Pascal Bourguignon
2005-05-23 4:39 ` Neon Absentius
0 siblings, 1 reply; 4+ messages in thread
From: Pascal Bourguignon @ 2005-05-23 2:46 UTC (permalink / raw)
Neon Absentius <absent@sdf.lonestar.org> writes:
> Hello,
>
> how can I make sure that the regular expressions are case sensitive?
> By looking at the manual I thought that if the expression contains
> a capital letter then it automatically is case sensitive. However
> evaluating (looking-at "A") when the point is before an "a" returns
> true.
What regular expressions?
M-x apropos RET case-fold RET
-->
isearch-toggle-case-fold
toggle-case-fold-search
default-case-fold-search
--
__Pascal Bourguignon__ http://www.informatimago.com/
Nobody can fix the economy. Nobody can be trusted with their finger
on the button. Nobody's perfect. VOTE FOR NOBODY.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Case sensitive regexp
2005-05-23 2:46 ` Pascal Bourguignon
@ 2005-05-23 4:39 ` Neon Absentius
0 siblings, 0 replies; 4+ messages in thread
From: Neon Absentius @ 2005-05-23 4:39 UTC (permalink / raw)
On Mon, May 23, 2005 at 04:46:19AM +0200, Pascal Bourguignon wrote:
> Neon Absentius <absent@sdf.lonestar.org> writes:
>
> > Hello,
> >
> > how can I make sure that the regular expressions are case sensitive?
> > By looking at the manual I thought that if the expression contains
> > a capital letter then it automatically is case sensitive. However
> > evaluating (looking-at "A") when the point is before an "a" returns
> > true.
>
> What regular expressions?
>
>From the elisp manual
,----
|- Function: looking-at regexp
| This function determines whether the text in the current buffer
| directly following point matches the regular expression REGEXP.
`----
So, since the regular expression "A" matches only the string "A" I
assumed that (looking-at "A") would return true only if the character
following point was "A".
> M-x apropos RET case-fold RET
>
> -->
> isearch-toggle-case-fold
> toggle-case-fold-search
>
> default-case-fold-search
>
Thanks. That did it.
--
Charity in capitalism is like urinating to extinguish a forest fire.
-- Neon Absentius
absent a.in.cirle sdf period lonestar period org
SDF Public Access UNIX System - http://sdf.lonestar.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Case sensitive regexp
2005-05-23 1:26 Case sensitive regexp Neon Absentius
@ 2005-05-23 17:18 ` Kevin Rodgers
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-05-23 17:18 UTC (permalink / raw)
Neon Absentius wrote:
> how can I make sure that the regular expressions are case sensitive?
> By looking at the manual I thought that if the expression contains
> a capital letter then it automatically is case sensitive.
I think that is true when the regexp is entered interactively, e.g.
with C-s.
> However
> evaluating (looking-at "A") when the point is before an "a" returns
> true.
Try (let ((case-fold-search nil)) (looking-at "A"))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-05-23 17:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-23 1:26 Case sensitive regexp Neon Absentius
2005-05-23 17:18 ` Kevin Rodgers
[not found] <mailman.1370.1116812606.25862.help-gnu-emacs@gnu.org>
2005-05-23 2:46 ` Pascal Bourguignon
2005-05-23 4:39 ` Neon Absentius
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).