David Green wrote:
On 2010-05-31, at 5:32 pm, Chris Fields wrote:
I think, in order to get regexes to work we will need a way of getting the
name of the matching regex from the Match object somehow. Any idea how to
do that?
afaict there's no direct way, only workarounds (as David showed).
On 2010-06-03, at 3:13 am, Moritz Lenz wrote:
... unless you push all the replacement markers onto an array, and
traverse the array during the substitution phase.
I thought of that, but it didn't work when there's a case of longest-token
matching. That is, if you try to match both 'A' and
On 2010-05-31, at 5:32 pm, Chris Fields wrote:
I think, in order to get regexes to work we will need a way of getting the
name of the matching regex from the Match object somehow. Any idea how to do
that?
I had started working on this too, and ended up going on quite an adventure...
my
Moritz,
Funny, went to IRC after seeing this brought up to respond, and didn't even
notice you made this the weekly contribution to perl6! I have a Str.trans
implementation on my rakudo github fork that's working and passes 20 tests:
http://github.com/cjfields/rakudo
A few caveats:
1