现在有一个字符串,refs/heads/xxxx,想剔除掉refs/heads/,应该怎么表示
如果是 linux bash 的话 可以用 echo 'refs/heads/xxxx' | grep -oP '/xxxx'或者 a=" refs/heads/xxxx" echo ${a##*/}