From: Hans Fugal Date: 2006-03-13T06:23:45+09:00 Subject: Re: Regular Expression Intersection Robert Klemme wrote: > Benjohn Barnes wrote: >> On 12 Mar 2006, at 09:58, Dan Kohn wrote: >> >>> You'll generally get a better answer if you include an example in >>> your question. Also, that link didn't work. >>> >>> If you're asking how to apply two regexps, you can use the scan >>> method to get the results in arrays, and then intersect them with &. > > This does not help at all as Benjon explains. The question is not > whether there are some strings in a set of strings that are matched by > both RX but whether there is at least one string among *all* possible > strings that is matched by both. .... > No. He wants to know whether S(R1) & S(R2) is not empty. At least > that's what he stated. You might be able to solve the problem by > finding Ri but that was not the original problem stated. Yes, precisely. I figured out how to do it manually for this application which uses a simple regex syntax. Doing it for the Regexp class in general would be quite another thing. Having now done it, I think it would make a great quiz, with a little head start (which I am willing to give). Are you listening James? If anyone's interested in the solution I came up with let me know.