re-pattern only used for pattern attribute.