fix #2328: Have a wrapper around Matcher to avoid String related memory
issues