What do ‘lazy’ and ‘greedy’ mean in the context of regular expressions?

Greedy will consume as much as possible. From http://www.regular-expressions.info/repeat.html we see the example of trying to match HTML tags with <.+>. Suppose you have the following: <em>Hello World</em> You may think that <.+> (. means any non newline character and + means one or more) would only match the <em> and the </em>, when in … Read more