How does this work with patterns of various greediness? E.g.:

matchesFull(new RegExp("<.+?>"), "<a>haha</a>")