Next Regular Expression Mastery 23

`Greed' is Often Misunderstood

/a+b/

             START             |a a b a a a a a a a a b   
             a                 |a a b a a a a a a a a b    Yes!
             +                 <a|a b a a a a a a a a b
              a                <a|a b a a a a a a a a b    Yes!
              +                <a a|b a a a a a a a a b
               a               <a a|b a a a a a a a a b    Nope.
               b               <a a|b a a a a a a a a b    Yes!
               END             <a a b>a a a a a a a a b    Yes!



Next Copyright © 2002 M. J. Dominus