多个字符串找到不同点

WBOY
Release: 2016-06-13 13:10:43
Original
952 people have browsed it

多个字符串找出不同点
假如我有如下字符串
(
  [0] => http://news.qq.com/newsgn/zhxw/shizhengxinwen_2.htm
  [1] => http://news.qq.com/newsgn/zhxw/shizhengxinwen_3.htm
  [2] => http://news.qq.com/newsgn/zhxw/shizhengxinwen_4.htm
  [3] => http://news.qq.com/newsgn/zhxw/shizhengxinwen_5.htm
  [4] => http://news.qq.com/newsgn/zhxw/shizhengxinwen_80.htm
)

有什么好的算法可以得到他们的不同点,用(*)替代?
比如以上网址可以归纳为

http://news.qq.com/newsgn/zhxw/shizhengxinwen_(*).htm

------解决方案--------------------
算法需要建立在每组字符串都有某种相同的规律。
如果是 array('hello', 'hellp', 'world'); 怎么表示? (*)(*)(*)(*)(*) ?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!