I’m trying to perform a regex match in PHP and I wonder how to do it correctly.
I looked into preg_match
and things but it looks very confusing for a newbie like me.
I know that in AHK (AutoHotKey) I can use this command:
regexmatch(var, "<td style=""""><a.*?>(.*?)</", out)
And var
is:
<td style=""><a href="/player/33598934">tofind</a></td>
and then variable out1
would be:
tofind
But how can I achieve this in PHP?