Example:
$word = "Your IP address=10.0.0.1</br>my ip address=127.0.0.1</br>";
how can i taking that ip address string using preg_match_all?
Example:
$word = "Your IP address=10.0.0.1</br>my ip address=127.0.0.1</br>";
how can i taking that ip address string using preg_match_all?
A pragmatic attempt in this case would be to match everything between the = and the </br>:
preg_match_all('~=(.*?)</br>~', $string, $matches);
var_dump($matches);
Note the ? which marks an ungreedy match. If you omit that you would get the following match:
10.0.0.1</br>my ip address=127.0.0.1
Of course you need preg_match_all() to get every match (IP) an not just the first.