On 18. Oct 2004, at 0:45, Peter McMaster wrote:
Doesn't work if you have a regexp like this though: %r{foo{2,10}
Okay, I've added these two sub-patterns: { name = "Escaped Characters"; match = "\."; }, { name = "Arbitrary repetition"; match = "\{\d+(,\d+)?\}"; },
The first eats all escaped characters, so it'll now also work with: %r{foo}bar}
The second eats the counted repetition construct you suggested.
There may still be a problem with { or } inside [] though.
Kind regards Allan