SELECT *
FROM `posts` AS p
WHERE NOT EXISTS (SELECT * FROM `comments` AS c WHERE c.user_id=1 AND p.post_id=c.post_id)
AND p.post_id=c.post_id
Пробую такой паттерн:<(a|p|b)>.*<\/\1>
...пробую такой:<(a|p|b)>[^\1]+<\/\1>
... оно мне выцепляет от самого первого тега b до последнего.
<code><(a|p|b)>.*?<\/\1></code>
{
"autoload": {
"psr-4": {
"App\\": "App"
}
}
}
composer install
preg_match('#width:\s*(\d+(?:\.\d+)?)px.*?height:\s*(\d+(?:\.\d+)?)px#is', $str, $match)
$match = [
'0' => 'width: 287.942px; height: 162px;',
'1' => '287.942',
'2' => '162',
];
preg_match('#width:\s*(\d+(?:\.\d+)?)px#is', $str, $match)
preg_match('#height:\s*(\d+(?:\.\d+)?)px#is', $str, $match)
$('progress').val($('progress').val() + 20);
<p>
будет с новой строкиvar text1 = $(".wrap_info_calc p").map(function(){
return $(this).text();
}).get().join('\n');
$(".wrap_box_info textarea").text(text1);
<br>
var text1 = $(".wrap_info_calc p").map(function(){
return $(this.innerHTML.replace('<br>', '\n')).text();
}).get().join('\n');
$(".wrap_box_info textarea").text(text1);
$price = $data->ticker->price;
object(stdClass)#2 (4) {
["ticker"]=>
object(stdClass)#1 (5) {
["base"]=>
string(3) "BTC"
["target"]=>
string(3) "RUR"
["price"]=>
string(15) "475260.76937314"
["volume"]=>
string(13) "1206.63030836"
["change"]=>
string(10) "3.44370048"
}
["timestamp"]=>
int(1521061861)
["success"]=>
bool(true)
["error"]=>
string(0) ""
}
if (preg_match("/^\d+[а-я]?$/iu", trim($home["name"])))