I get some strings like phs(2.1.2):someinfo
and I want to receive a version (2.1.2) in variable with hel of php and it's regexp abilities.
I get it like:
if (preg_match('/phs\((.*)\):/', $line))
{
echo $line.'<br>';
}
It's ok, but now I want to get stored variable of regexp. I've found that I can get it as \1, but when I try it it's white screen in browser, so it doesn't work. Is it possible to get variables from regexp? Or there is better sollution?