Excuse me, I am making a terrible mistake somewhere, but this is the situaton:
In php i have:
$ln = "A/RADIUS ADMITS VALUE 20";
$trg = "A/RADIUS";
$matches = array();
$zz = preg_match('#$trg\sADMITS\s(VALUE)\s([^\s]+)#',$ln,$matches);
I want to capture the word "VALUE" without quotes and the last word, here the string 20, given by ([^\s]+) . That is not a whitespace repeated more than once right?
But $zz is 0, indicating no match and $matches is empty. I also tried with
$zz = preg_match('#'.$trg.'\sADMITS\s(VALUE)\s([^\s]+)#',$ln,$matches);
same problem.
Where is the mistake I am stupidly making?
preg_quote($trg, '#').