For example it works:
{<div\s+class=\"article\"><h2(.*)</div>}s
If I do this way, I get nothing:
{<div\s+class=\"article\">
<h2(.*)
</div>}s
I suspect that I should use some modifier, but I know which one from here: http://php.net/manual/en/reference.pcre.pattern.modifiers.php
That would be the
/xmodifier:It also allows commenting the pattern, which is extremely useful: