I want to catch values from this string:
$data='1=A
5=B
7=F
11=G';
The next piece of code works fine, but is using two regular expressions. Is there a way to use only one?
$i = 1;
if (!preg_match("/
$i=(.*)/",$data,$m))
{
preg_match("/^$i=(.*)/",$data,$m);
}