I am trying to parse some text and retrieve info inbetween two strings. The regex seems to be fine, but I still do not get any result.
The text string looks like this: ""<h1 class="csc-firstHeader">Text I want to retrieve</h1></header>
The php code I am using:
$start = preg_quote('Header">', '/');
$end = preg_quote('</h1>', '/');
$regex = '#'.$start.'(.*?)'.$end.'#';
echo $regex;
$code = preg_match($regex, $text, $matches);
print_r($code);
print_r($matches);
The result is unfortunately empty.