The bit in red simply tells the regex, instead of looking for "all text", look for "all text as long as it doesn't have the < or > which signify tags".
To be really advanced, you would use a negative lookaround checking for specific tags, but at that point it might be worth moving on to some engine that can actually parse html.