I have a simple regex im running in PHP, and for some reason it wont work with the opening bracket. See:
$str = 'sdfsf sdfs<link rel="stylesheet" id="editor-buttons-css" href="http://localhost/wordpress/wp-includes/css/editor.min.css?ver=3.6" type="text/css" media="all">sdfsd sdfsdl';
$reg = '/<link[\s\S]+eet/';
preg_match($reg, $str, $re);
print_r($re);
// outputs: Array ( [0] => );
$str = 'sdfsf sdfs<link rel="stylesheet" id="editor-buttons-css" href="http://localhost/wordpress/wp-includes/css/editor.min.css?ver=3.6" type="text/css" media="all">sdfsd sdfsdl';
$reg = '/link[\s\S]+eet/';
preg_match($reg, $str, $re);
print_r($re);
// outputs: Array ( [0] => link rel="stylesheet );
How can I get the regex to work with the opening bracket?