I don’t understand what is wrong, how can I have this error for this simple regex.
I can type whatever I want, it will always give me the same error. And in the message itself it doesn’t show which modifier causes the problem, the modifier is just empty.
public function getRows($content) {
$regex = '/[a-z]+/';
preg_match($content, $regex, $rows);
print_r($rows); exit;
return $return;
}
The first parameter is the regex, the second is the subject:
from preg_match() in the Manual
So this should work fine: