通过正则表达式[关闭]从这一块文本中提取“图像”属性

I can find many examples of finding URL's withing HTML, however, I need to be more specific and extract the URL for the image in the following piece of text:

I will only need the first match.

I am using PHP.

Expected value result: http://cdn.somewebsite.com/path/123.jpg

var flashvars = {
'url_mode':'1',
'image':'http://cdn.somewebsite.com/path/123.jpg',
'bufferlength':'3',
'id': 'player',
'autostart': 'true'
...
};

Using preg_match with positive lookbehind assertion:

$data = <<< EOF
var flashvars = {
'url_mode':'1',
'image':'http://cdn.somewebsite.com/path/123.jpg',
'bufferlength':'3',
'id': 'player',
'autostart': 'true'
...
};
EOF;

preg_match("/(?<='image':')[^']+/", $data, $match);
echo($match[0]);

Hi this should work for you.

preg_match(/http.*?\.jpg/)