[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using non-Emacs regexp syntax
From: |
Paul Pogonyshev |
Subject: |
Re: using non-Emacs regexp syntax |
Date: |
Wed, 29 Nov 2006 21:06:24 +0200 |
User-agent: |
KMail/1.7.2 |
Richard Stallman wrote:
> Is there a function to convert non-Emacs regexps (e.g. "ab(c+|d)" to
> Emacs regexps (example to "ab\(c+\|d\)")?
>
> The first form appears to be an "extended regexp" or egrep-style regexp.
> The second appears to be a "basic regexp" or grep-style regexp.
>
> This conversion feature in Lisp would be useful to add after the release.
If you don't mind, I'll work on it now. Changes can be added to whatever
.el file in the distribution later.
Also, is there sense in supporting conversion to and from several formats?
E.g. some require that plus operator is escaped, while everything else is
not. E.g. something like this:
(convert-regexp :sed :emacs some-regexp)
FROM TO PATTERN-STRING
Of course, it will add more complexity, but it shouldn't be much of a
problem for users of this function and implementing it in Lisp should still
be not hard.
Paul
- using non-Emacs regexp syntax, Paul Pogonyshev, 2006/11/28
- Re: using non-Emacs regexp syntax, Richard Stallman, 2006/11/29
- RE: using non-Emacs regexp syntax, Drew Adams, 2006/11/29
- Re: using non-Emacs regexp syntax, David Kastrup, 2006/11/29
- Re: using non-Emacs regexp syntax, Paul Pogonyshev, 2006/11/29
- Re: using non-Emacs regexp syntax, Jari Aalto, 2006/11/29
- RE: using non-Emacs regexp syntax, Drew Adams, 2006/11/29
- Re: using non-Emacs regexp syntax, Stefan Monnier, 2006/11/30
Re: using non-Emacs regexp syntax,
Paul Pogonyshev <=