ned(_dot_)freed(_at_)mrochek(_dot_)com wrote:
(1) The ${0}, ${1} all-digit variables should be set and modified by the
glob-style :matches mechanism in addition to :regex. It really should
not be necessary to implement regex in order to get the ability to
set variables based on message inputs. For example:
This leads to ambiguity, however.
Good point, but it is an ambiguity that is easily resolved simply by saying
glob patterns have to implement greedy matching when variables are used.
I implemented a mostly-linear time glob algorithm by implementing
minimal matching left-to-right. I am opposed to any semantic that would
result in pattern matching being fairly expensive (specifically, any
algorithm that results in * being recursive is bad).
If I had done minimal-matching right-to-left, would the result have been
greedy? (This would resolve my objection.)
Let me know if this doesn't make sense; I'm not an expert on this.
Tim