Re: patsubst: multiline text

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Organization Red Hat
Message-ID <[email protected]>
On 09/07/2010 03:20 PM, clemens fischer wrote:
> BTW, I couldn't get non-greedy ".+?" or ".+\?" to work, this definitely
> deserves fixing, because at times "[^abc]+" doesn't cut it, eg. if
> a match for more than one character is needed.

M4 1.4.x only supports the glibc emacs flavor of regexp.  M4 2.0 has 
improved regex support, allowing you to choose different flavors 
supported by glibc, such as strict posix, extended regex, and so forth, 
but still needs tweaking before it will support tunables like 
case-insensitivity.

>
> And how about look-forward/look-behind, like in Perl/Python/PCRE?

M4 2.0 will allow modules, so it is conceivable that someone could add a 
PCRE module for a different regex engine.  But the default will still be 
to provide only what glibc provides (even on non-glibc platforms, since 
gnulib's regex implementation mirrors glibc).

But, as has recently been noted on this list, M4 2.0 is a ways off 
(mainly due to lack of developer time).

-- 
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.