开发者

Regex: Get First Param

My Regex:

#\<param name\=\"src\"+.+\"\s\/\>#

The problem is that stops at the second /> but I want just the first <param>.

  <para开发者_运维问答m name="example" src="hello.swf" />
  <param name="stuff2" />

So how should I get just the first param?


Probably something like this...

#param name="([a-zA-Z0-9]+)" src="(.*?)"#is

Your result should be in $match[2]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜