/** * 正则删除内容中的链接 * * @param * @author 编程之家 jb51.cc jb51.cc **/ $string = preg_replace('/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i','',$string);