Emacs query-replace-regexp multiline?

Try character classes. As long as you're using only ASCII character set, you can use :ascii: instead of the dot. Using the longer :ascii::nonascii: ought to work for everything.

Awesome thanks dude – Neil Sarkar Aug 20 '09 at 22:27.

M-x re-builder is your friend. And it led me to this regular expression: "\\(.\\|\n\\)*" which is the string version of \(.\|^J\)* ;# where you enter ^J by C-q C-j And that works for me when I do re-search-forward, but not when I do 'query-replace-regexp. Unsure why... Now, when doing a 're-search-forward (aka C-u C-s), you can type M-% which will prompt you for a replacement (as of Emacs 22).

So, you can use that to do your search and replace with the above regexp. Note, the above regexp will match until the last found in the buffer, which is probably not what you want, so use re-builder to build a regexp that comes closer to what you want. Obviously regular expressions can't count parenthesis, so you're on your own for that - depends on how robust a solution you want.

I'm curious about how to use it. – seth Aug 20 '09 at 22:19 Not that I can find. The Emacs Wiki doesn't have much on it either.

But it's pretty self-explanatory (isn't all of Emacs :). After entering re-builder, type C-c C-h and you'll get a listing of bindings including those that apply to re-builder which all begin with C-c. – Trey Jackson Aug 20 '09 at 22:22 Yah, I got that far.

Was just looking for something a bit more in depth. Thanks! – seth Aug 20 '09 at 22:24.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions