我需要一个用于替换 URL 的正则表达式,如下所示:
http://www.domain.com/web/
我试过了:
$pattern = '/\bhttp\S*\/"\b/';
但不工作。
我需要一个开头和结尾的字符串,它是一个 JSON 字符串,带有
"ImgRemotePath":"http:\/\/localhost\/\/web\/images\/obj\/car.png"
或者
"ImgRemotePath":"http:\/\/localhost\/\/web\/images\/"
我需要最后删除:
"ImgRemotePath":"http:\/\/localhost\/\/web\/images\/"
至
"ImgRemotePath":""