> > In fact, you could
> > just return that array from a "matches", and let me capture it
> > and play with it. Then if I want to do a fancy replacement, I could
> > do this:
> >
> > [% m = string.matches('(.*?)(\w+)\s+(\w+)(.*)');
> > m.0; m.2; " "; m.1; m.3 %]
> >
> > which swaps the first two \w+ words. How about that? Can we have that?
>
> Yes, you can have this. :-)
Any chance of having the /i and /s modifiers for matches and search
and the option not to have the /g modifier for replace?
I've been replacing \n with \r in my templates before doing a replace
in order to be able to get it to treat the string as a single line
(then I replace all occurances of \r with \n -- I know I don't have
any carriage returns in my data).
Andrew