Tim Bunce: # On Thu, Jan 31, 2002 at 05:15:49PM +0000, Graham Barr wrote: # > # > Yes, I was assuming that. However what is to be gained by case # > folding the input string ? # > # > Because parts of an rx can be case-insensitive while other parts # > are case-sensitive, we will probably need two sorts of ops anyway # > (or a way to tell the op to be case-insensitive). And you will # > only be able to do the case folding when the whole rx is # case-insensitive. # # (Two sorts of ops makes most sense to me as the case-insensitive op # will need to know about fiddly charset conversion stuff whereas the # case-sensitive can just work with the list-of-integers abstraction.) # # > It also means creating a copy of the input string, which is # something # > the current rx engine in perl5 tries to avoid. And while I # will agree # > that it is often faster todo lc($str) =~ /.../ than $str =~ /.../i # > that is normally only the case for small-ish strings. # # Agreed on all counts. # # Especially as the perl6 rx engine will have to be able to # work directly on # non-trivial things like streams and generators ans suchlike.
I have a suggestion similar to the ops suggestion but more flexible: Regex vtables. We'd probably need three: -normal text match -case-folded text match -generic sequence match (the stuff Larry's been talking about) This could probably be implemented without too much difficulty. Let me know if I'm brilliant, on crack, or both with this idea. --Brent Dax [EMAIL PROTECTED] Parrot Configure pumpking and regex hacker Check out the Parrot FAQ: http://www.panix.com/~ziggy/parrot.html (no, it's not mine) <obra> mmmm. hawt sysadmin chx0rs <lathos> This is sad. I know of *a* hawt sysamin chx0r. <obra> I know more than a few. <lathos> obra: There are two? Are you sure it's not the same one?