[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Raw strings (experimental patches inside)
From: |
Stephen J. Turnbull |
Subject: |
Re: Raw strings (experimental patches inside) |
Date: |
Sat, 11 Aug 2012 16:39:49 +0900 |
Vr Rm writes:
> /.*\)$/
>
> i.e. a parenthesis at the end of a line. I can't do it!
What you have is a syntax error interactively. It should work in a
program (the backslash is a no-op in a string). /)$/ is good enough
and works in both interactive regexp search and in a program (unless
you need to match the whole line, in which case /^.*)$/ is what you
want (AFAIK Emacs doesn't guarantee longest match even today; I think
you can omit the "^" here, but I'd need to read the source to be
sure).
> [I'm a member of a] population that would dramatically benefit if
> they could actually use Emacs regular expressions.
Sure, but your blockage is that you aren't using Emacs REs, you're
trying to use some other kind of RE.
I think you might be helped a tiny bit by rawstrings, but I have to
admit that Stefan is right in your case: the problem is not the
proliferation of backslashes, it's that Emacs has a unique and
comparatively awkward syntax for regular expressions. Rawstrings
might make it a little bit easier for you to adapt, though.
- Re: Raw strings (experimental patches inside), (continued)
- Re: Raw strings (experimental patches inside), Stephen J. Turnbull, 2012/08/10
- Re: Raw strings (experimental patches inside), Stefan Monnier, 2012/08/10
- Re: Raw strings (experimental patches inside), Stephen J. Turnbull, 2012/08/10
- Re: Raw strings (experimental patches inside), Stefan Monnier, 2012/08/10
- Re: Raw strings (experimental patches inside), Stephen J. Turnbull, 2012/08/11
- Re: Raw strings (experimental patches inside), Dmitri Paduchikh, 2012/08/11
- Re: Raw strings (experimental patches inside), Stephen J. Turnbull, 2012/08/11
- Re: Raw strings (experimental patches inside), Vr Rm, 2012/08/10
- Re: Raw strings (experimental patches inside), Davis Herring, 2012/08/10
- Learning Emacs regexp (was: Re: Raw strings (experimental patches inside)), chad, 2012/08/10
- Re: Raw strings (experimental patches inside),
Stephen J. Turnbull <=
Re: Raw strings (experimental patches inside), Dmitry Gutov, 2012/08/10
Re: Raw strings (experimental patches inside), Stefan Monnier, 2012/08/11