fix regex for detached tag checkout