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

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

Re: line-spanning regexp


From: Kevin Rodgers
Subject: Re: line-spanning regexp
Date: Wed, 15 Jan 2003 13:13:35 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Bingham, Jay wrote:

On Tuesday, January 14, 2003 7:47 PM Greg Hill Wrote

"string1[^\n]*[\n]?[^\n]*string2"

The above pattern for a regexp may NOT work in all circumstances.
Specifically it may not work correctly when used in interactive regular
expression searches (isearch-forward-regexp, C-M-S;
isearch-backward-regexp, C-M-r; search-forward-regexp and
search-backward-regexp).


I assumed the presence of the delimiting double quotes was to indicate that
he meant a string to be passed to the non-interactive functions and not a
key sequence to be typed to the interactive commands.

...


The correct regexp (that does not depend on the presence of an n or \)
to use in interactive searches is (as typed to enter it):

"string1[^C-qC-j]*[C-qC-j]?[^C-qC-j]*string2"


Isn't `[^C-qC-j]' equivalent to `.'?


--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

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