[Top][All Lists]

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

Re: emacs regexp question

From: Kevin Rodgers
Subject: Re: emacs regexp question
Date: Wed, 04 Jun 2003 11:30:32 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

address@hidden wrote:

- How should I ask for the first occurrence of two blank lines?

interactively: ^ C-q C-j C-q C-j
programmatically: "^\n\n"

- How should I ask for the first occurrence of N blank lines for some fixed,
yet large, N. I think emacs uses ^ for the start of the line, though I've
seen some regexp libraries (not for emacs) that use the ^ as a sort of
"exponentiation" symbol for the number of times a string is concatenated.

interactively: ^ C-q C-j \{ N \}

programmatically: "^\n\\{N\\}"

- How can I search for regexps that have one or more newlines in the middle?

interactively: \( .* C-q C-j \)*
programmatically: "\\(.*\n\\)*"

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

reply via email to

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