From: David Alan Black Date: 2002-07-13T23:49:59+09:00 Subject: Re: Dynamic Methods Hi -- On Sat, 13 Jul 2002, John wrote: > > (What do you propose if more than one possibility matches, by the > > way?) > > Maybe to call ALL of the methods? ;-) Or raise TooManyMethodsError :-) > Must admit to not having thought of that yet. Obviously calling all of them > is pretty weird, due to what order are they called in. > > Would it be possible to see if a regular expression intersects with another > regular expression, and if so not add the one that overlaps? I agree with Michael that it sounds (literally, scientifically) impossible, though living as I do under a CS glass ceiling I don't know how the proof would go (if there is one) and would defer to more learned opinion if said opinion were different. But still, impossible or not, imagine being presented with: /(^|blah)[^\Wc-gi-z]{2,3}/ and /^...?([hi])\1/ and having to determine whether or not a string existed that matched them both. "Impossible" is close enough for me :-) I wonder whether you could get by with a very simplified wildcard scheme (instead of regexes) -- that might be easier to do this kind of testing with. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav