Rick Delaney <rick.delaney@home.com> wrote: |> Jeffrey Friedl wrote: |> > I don't believe that you can have a meaningful understanding of Perl |> > regex semantics without understaning the concept of how a |> > nondeterministic finite automata engine works. |> |> I disagree. The section "Combining pieces together" in perlre seems |> quite sufficient. I think we agree -- it's just saying the same thing in a different way. On one hand, I find the perlre way easier to understand simply because it doesn't have the phrase "nondeterministic finite automata" in it :-) On the other hand, I find it harder because it uses examples like A'B' (A-prime B-prime) which remind me of math theory, which puts me to sleep. YMMV. |> Everything else is just illustration. It might be useful to illustrate |> regexp behaviour by discussing the NFA approach, but it is not necessary |> since regexps could (theoretically) be implemented differently. Indeed, which is what Perl does (perl emphasizes the "N" of NFA, and doesn't emphasieze the "F" so much :-) |> If you wanted to introduce these in an implementation independent way, |> it looks like you could define \v as a new operator where |> |> S\vT |> |> is essentially the same as |> |> (?>S)T |> |> but I don't think that's exactly what you have in mind. For that example, yes, it is. But there are situations where \v could not be described with (?>...). Also, it's much less clutter. |> And \v doesn't look very much like an operator. I sort of like how it looks like a wedge, but its apperance is not really important to discuss until it's decided if the functionality is worth adding. Jeffrey