Add support for regex and arbitrary selectors