refactor(dom) selectByPatter