From: James Edward Gray II Date: 2004-10-05T23:04:13+09:00 Subject: Re: Regexp match question on interpolated strings... On Oct 5, 2004, at 4:09 AM, Brian Schr�der wrote: > Regular expressions are not able to "count" more than a finite number > of states, and the number of states is fixed at compile time. That is > because regular expressions map to finite automata. So it is > impossible to match opening and closing braces in an unknown > expression. For this to work always you need a model that can enter > unbounded many states. Just for the sake of clarity, you are speaking of Ruby's regular expressions here. Perl's regex engine has no such limitation. Using the (?? ... ) construct, Perl regular expressions can parse balanced delimiters. I miss this feature and would love to see Ruby add something similar in the future. James Edward Gray II