here is my string
0 12 10 0 5 0 albert 126 al br t 881 alert 58 a lbr t 317 apart 251 al b rt 284 ambit 165 a lb rt 9 album 93 a l br t 881 10 6 13 0 einstein 92 en stein 219 epstein 8 e n stein 335 eastern 62 ens t ein 317 enshrin 13 en st ein 231 enseign 3 ens tei n 203 false albert einstein 154 albert einstein (al br t) einstein 1030 al br t einstein albert (en stein) 318 albert en stein albert epstein 134 albert epstein alert einstein 139 alert einstein
I need to get the value in between false and the number next to the words.. in the above case I require
...false albert einstein 154... => albert einstein
I tried the below regex match, but its not working. What am I missing here?
$matches=array();
preg_match('/false=([a-z]+)\[0-9]+/', $response, $matches);
echo $matches[1];
\[the character class? That will not make the number matching work. And your example text contains spaces that you do not account for. And why does your regex look for a=after thefalse?