friedman@splode.COM (Noah Friedman) writes:
> >because "(AND pat1 pat2)" -- or in agrep, "pat1;pat2" -- matches in
> >any order.
>
> I don't see how order can be important for either conjunction or
> disjunction of regexps, assuming that grouping can't be extended across
> patterns separated across `;' or `,'.
I thought the remark meant that it is convenient to match, e.g., `a*c'
and `b*d' against all of
_a_c_b_d_,
_a_b_c_d_,
_a_b_d_c_,
_b_a_c_d_,
_b_a_d_c_,
_b_d_a_c_,
that is, the matching parts in the text can be in any order, even
interleaved. It would be unpleasant to be forced to write a single
regexp of concatenation, union and closure to do that; concatenation
is so particular about the order.
--
Jussi Piitulainen
|