[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:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
gmayer@cs.bgu.ac.il 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:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>