所以,假设我有just-a.domain.com,just-a-domain.info,just.a-domain.net如何删除扩展名.com,.net.info ...,我需要两个变量的结果,一个是域名,另一个是扩展名.
just-a.domain.com,just-a-domain.info,just.a-domain.net
.com,.net.info ...
我试过str_replace但不起作用,我猜只有正则表达式....
str_replace
php regex
php ×1
regex ×1