我需要从跨度中删除网址的最后一部分..
我有
<span st_url="http://localhost:8888/careers/php-web-developer-2"
st_title="PHP Web Developer 2" class="st_facebook_large" displaytext="facebook"
st_processed="yes"></span></span>
我需要把它拿走st_url并从中移除php-web-developer-2,所以它只是http://localhost:8888/careers/.
但我不知道该怎么做。php-web-developer-2不会总是那样,但它不会有任何/东西。它将始终是一个-分隔的字符串。
任何帮助!???