我有 3 个版本的字符串:
[center][thumb]http://some_domain.com/uploads/posts/2010-04/1271272006_tn.jpg[/thumb][/center]
[center][img]http://some_domain.com/uploads/posts/2012-01/1325796885.jpg[/img][/center]
[img]http://some_domain.com/uploads/posts/2012-01/1325796885.jpg[/img]
也可以是[left][/left]
或[right][/right]
。前两个我通过选择/\[(center|left|right)\]\[(img|thumb)\](.*)?\[(\/img|\/thumb)\]\[(\/center|\/left|\/right)\]/
,但第三个是一个问题:如何检查“以前的”是否不存在?
PS我只需要获取网址。