Okay, so much for PCRE match.

Can someone show me give me pointers on PCRE replace?

Ideal would be something with all the =~ s/// semantics from perl.
(Not sure if this is included in Text.Regex.PCRE. is it?)

In other words, how to do this with (preferrably) Text.Regex.PCRE ?

Of course in this case a POSIX regex is fine, but since PCRE is faster
and more expressive, and what I'm used to anyway, PCRE is probably is
what I will tend to use by default, unless portability is paramount.

****************************
[EMAIL PROTECTED]:~/learning/haskell/UnixTools$ cat lines.txt
a b c
a b c
a b c

[EMAIL PROTECTED]:~/learning/haskell/UnixTools$ cat lines.txt |
perl -ne '$_ =~ s/(\w) (\w) (\w)/$1 z $3/; print $_'
a z c
a z c
a z c
[EMAIL PROTECTED]:~/learning/haskell/UnixTools$
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to