> Leftmost-first matching is difficult to explain. > When POSIX had to define the rules for regexps, > they chose to define them as leftmost-longest > even though all the implementations were leftmost-first, > because describing leftmost-first precisely was too > complex. > > Leftmost-first matching is not widely understood. > At the beginning of this conversation, you believed that in the > absence of non-greedy operators, leftmost-first matching > produced leftmost-longest matches. I would guess that > more people believe this than know otherwise.
Yes. I weren't quite acquainted with the problematics. Probably because I have never bumped into a problem with the leftmost-first implemenatation. Perhaps my problems were just not complex enough to notice a regexp finds sth. different from my expectation. Seems to be a case of majority of people. (E.g. Vim seems to use leftmost-first, too.) Ok. I am just somehow tired now with this. I thank everybody who positively contributed to this thread. I'll wait some time and will try to use what is present and I will see. Ruda
