Hello,
Please let me know whats wrong with the following RegEx. I am trying to get 'tall' and 'taller' from the $str. But I am getting only 'tall'. Please help.
Thanks a lot in advance.PHP Code:<?php
$str = "Jack is a tall man but his brother is taller than him";
$pattern = "/tall(er)*/";
preg_match($pattern, $str, $matches);
print_r($matches);
?>
Thanks & Regards.




Reply With Quote