我正在尝试从以下位置提取 src 属性: [attname src="http://example.org"] somecontent [attname src="http://www.example.com"]
我现在拥有的:
preg_match_all('#attname src=".*[^"]#', $buffer, $bufferarr);
但是它不起作用 - 在 second 之后没有停止"
,结果是:attname src="http://example.org"] somecontent [attname src="http://www.example.com