in reply to Re^4: Perl regex in real life
in thread Perl regex in real life

You are correct, of course. My example did not show backtracking in action. However, if the data I'm trying to match were lists of phone numbers:

backtracking then does become involved. Even though we only match one or two digits in the examples above, the expression does begin to match and then has to fail and try something else.

I guess I really didn't understand your point. How would you propose a system like regular expressions to handle failing partial matches?

As for using a more intelligent system, that is not a particularly useful suggestion when you are trying to develop the more intelligent system in the first place. Regular expressions are often used for lexing before making passing data to the more intelligent system.

G. Wade