I am using file_get_contents
to scrape some data from a web page.
This part is working fine. I just need 1 value on the page.
My regex is not great so it will be helpful if you can help.
This is the data I want to retrieve
var number = 100;
I only need to get the number. The number is always going to be different but var number
will always be the same.
$regex = '/var number =/';
preg_match($regex,$data,$match);
The above will return var number =
, how can I make it return the actual number?