Replace anchor pattern by core contain function