Re: patsubst: multiline text

clemens fischer <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
Eric Blake wrote:

> 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.

So the non-greedy "?" postfix operator is not available below m4-2, did
I get this right?

It takes so much time to experimentally determine what works and what
doesn't, would it be possible to document the RE syntax available in
m4-1.x?  Even if only a README text, it would help quite a bit.

I even tried to get this info from the source, but it contains
a sizeable chunk of regex code in lib/reg*, some of which seems to be
there for compatibility/portability, so I eventually gave up.

> 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).

Yes, conceivable, but propably too much hassle for people who want to
publish their code in source form, compared to using hack-arounds with
vendor-supplied m4.  I guess regex modules would be made and used in
house, maybe even contributed some day.


clemens
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.