From: Robert Klemme Date: 2003-12-04T02:27:05+09:00 Subject: Re: Some Regexp "ts" schrieb im Newsbeitrag news:200312031510.hB3FAds20117@moulon.inra.fr... > >>>>> "H" == Hugh Sasse Staff Elec Eng writes: > > H> If the delimters were string constants, not regexps, and therefore > H> of constant length, how would a length greater than one cause this > H> to be impossible? > > You have found the problem : the delimiter can't be a regexp. You can have > string constants, this just make the implementation a little more complex > when it's really easy to do it when you have only one character. IMHO this is not fully correct: the regexp engine of Lua must have a special hack to support nesting (and apparently that for single chars only). You can't do that with regexp engines that stay on the grounds of regular languages, because finite automata can't count. (Ok, they *can* count to a certain limit, but then you have to code the count into the states which quite soon gets very messy.) So, normally regexps can't nest unless the regexp engine at hand has a special hack for this implemented, which catapults the set of recognizable languages out of the regular domain. :-) Regards robert