Although "greedy" is probably a better word to describe the behaviour of the /g modifier in regex, it actually means "global" - this is probably so as not to confuse it with greedy matching.

We're not matching <title>, we're matching a span tag with the class name of title: <span class="title"></span> and, as far as I know, you can have as many of those as you want on a page and it will still be valid HTML. Correct me if I'm wrong smile